Reputation: 2192
Following BitBucket docs: https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html
This is the example code snippet of cloning using git. But when using the ":" I get an error of "could not resolve hostname" but when I use "/" I don't have any issues. What am I missing? Is the documentation incorrect?
$ git clone ssh://[email protected]:teamsinspace/documentation-tests.git
$ git clone ssh://[email protected]/teamsinspace/documentation-tests.git
Upvotes: 0
Views: 860
Reputation: 83527
Note that every Bitbucket repo has a "Clone" button at the top right of the repo's home page. You can copy the correct git clone
command from there.
Upvotes: 0
Reputation: 94483
There are two different syntaxes for git SSH URLs:
ssh://[email protected]/teamsinspace/documentation-tests.git
and
[email protected]:teamsinspace/documentation-tests.git
See https://git-scm.com/docs/git-pull#_git_urls_a_id_urls_a
The Bitbucket docs mixed these two. This is an error in the docs.
Upvotes: 3