BitBucket SSH克隆Git [英] BitBucket SSH Cloning Git

查看:404
本文介绍了BitBucket SSH克隆Git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下BitBucket文档: https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html

Following BitBucket docs: https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html

这是使用git进行克隆的示例代码片段.但是当使用:" 时,出现错误无法解析主机名",但是当我使用"/" 时,我没有任何问题.我想念什么?文档不正确吗?

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://git@bitbucket.org:teamsinspace/documentation-tests.git
$ git clone ssh://git@bitbucket.org/teamsinspace/documentation-tests.git

推荐答案

git SSH URL有两种不同的语法:

There are two different syntaxes for git SSH URLs:

ssh://git@bitbucket.org/teamsinspace/documentation-tests.git

git@bitbucket.org:teamsinspace/documentation-tests.git

请参见 https://git-scm.com/docs/git-pull# _git_urls_a_id_urls_a

Bitbucket文档将这两者混合在一起.这是文档中的错误.

The Bitbucket docs mixed these two. This is an error in the docs.

这篇关于BitBucket SSH克隆Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆