Xcode - Authentication failed error when adding repository with SSH auth

流过昼夜 提交于 2020-01-03 03:12:27

问题


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.

By the way running git clone git+ssh://git@my.domain.com:port/project-name works fine.

EDIT

Running git clone without git+ssh//

git clone git@my.domain.cz:2222/project-name

or

git clone git@my.domain.cz:22/project-name

is giving me same error:

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.


回答1:


Xcode accepts just ssh://git@my.domain.cz:2222/project-name.

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.




回答2:


It always fails to me when I use existing ssh keys. I have created a new ssh key pair through Xcode and uploaded it to git server(my case Phabricator) and its works.



来源:https://stackoverflow.com/questions/37143563/xcode-authentication-failed-error-when-adding-repository-with-ssh-auth

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!