Xcode-使用SSH身份验证添加存储库时,身份验证失败错误 [英] Xcode - Authentication failed error when adding repository with SSH auth
问题描述
我正在尝试通过Xcode添加存储库>设置>帐户和我被卡在正确的地址上.我们的仓库地址很简单:my.domain.com:port/project-name.通过SSH密钥进行身份验证.有人可以帮我了解这里发生了什么吗?请参见下面的屏幕截图.
I am trying to add repository via Xcode > Settings > Accounts and I am stuck on the proper address. Address of our repo is quite simple: my.domain.com:port/project-name. Authentication via SSH Keys. Could someone help me to understand what's going on here? See screenshot below.
通过运行git clone git + ssh://git@my.domain.com:port/project-name可以正常工作.
By the way running git clone git+ssh://git@my.domain.com:port/project-name works fine.
编辑
运行不带git + ssh//
Running git clone without git+ssh//
git clone git@my.domain.cz:2222/project-name
或
git clone git@my.domain.cz:22/project-name
给我同样的错误:
ssh:连接到主机my.domain.cz端口22:连接被拒绝
ssh: connect to host my.domain.cz port 22: Connection refused
致命:无法从远程存储库读取
fatal: Could not read from remote repository
请确保您具有正确的访问权限,并且存储库存在.
Please make sure you have the correct access rights and the repository exists.
推荐答案
Xcode仅接受ssh://git@my.domain.cz:2222/project-name
.
在这种情况下,git
协议在某种程度上是多余的.原始的git
工具没有问题,但是Xcode出于某种原因不喜欢它.
The git
protocol is somehow redundant in this case. Raw git
tools don't have a problem with it, but Xcode does not like it for some reason.
这篇关于Xcode-使用SSH身份验证添加存储库时,身份验证失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!