Closed Sam-Kruglov closed 5 years ago
That issue is present generally in docker, no just in this stub runner. Maybe that problem is not even related to Spring Cloud Contract
Probably ~/.ssh
does not belong to root, right? So that doesn't look like a good strategy for mounting your ssh config.
I have mounted that, look:
-u root:root \
-v ~/.ssh:/root/.ssh \
without that I get a different error, saying that bitbucket.org
is an unknown host
Do you need to use ssh? Maybe https would work?
BTW you mounted the .ssh directory, but unless you are root in the host, the file ownership will be wrong in the container. AFAIK the container runs as root by default so -u root:root
seems redundant.
I am currently trying https. SSH is just less work for me because I already have SSH keys installed.
This may be a solution https://stackoverflow.com/a/56527389/6166627 but I am not sure I understand it completely, will need more time to look at it.
I guess you are right, but I don't think permissions cause the problem. I might try manipulating with it if you're certain. About user, I think that is clearer that way because I cannot use ~
HTTPS worked
I would still like to resolve this though. Unless you guys think it's off-topic, which would be understandable
I am trying to run the stubs using docker but it fails to clone the repository.
If I execute
git clone git://git@bitbucket.org:repoowner/spring-cloud-contracts.git
on the host it succeeds. Here is exactly what I am doing:Here is the exception: