Gitlab - Xcode无法连接远程存储库 [英] Gitlab - Xcode Can't connect with remote repository
问题描述
当我通过 Xcode 连接到我的存储库时遇到问题.
I am having troubles when I connect with my repository through Xcode.
我在远程服务器上的 TurnkeyLinux 虚拟设备上安装了 Gitlab 版本(完全预装).在 Gitlab Web 界面中,我创建了一个新的测试用户:testuser",密码为password"和一个新项目testproject".此用户已分配给此项目.
I have a Gitlab version (full pre-)installed on TurnkeyLinux Virtual Appliance on a remote server. In the Gitlab Web interface, I've created a new test user: "testuser" with a password "password" and a new project "testproject". This user was assigned to this project.
git url 项目为:
The git url project are:
HTTP: http://example.com/testuser/testproject.git
SSH: git@example.com:testuser/testproject.git
我可以通过 SSH 连接看到使用终端"正确创建的存储库文件夹.
I can see the repositories folder rightly created with a "Terminal" through SSH connection.
现在,我想将此 git 存储库添加到我的 Xcode 存储库中.
Now, I want add this git repository to my Xcode repositories.
所以,在
XCode > Preferences > Account
我正在尝试添加它,同时使用 url 和我的用户凭据,但总是收到以下消息:
I'm trying add it, using both urls and my user credentials, but always receive the following message:
"Authentication failed because the name or password was incorrect."
谁能帮帮我?
推荐答案
只有 http url 需要用户/密码,ssh 不需要.
The user/password would only be needed for an http url, not an ssh one.
当使用 http url 在您的 XCode 帐户,请确保没有会阻止解析 example.com
服务器的代理.
When using the http url to add a repo in your XCode Accounts, make sure there is no proxy which would prevent the resolution of the example.com
server.
如果还是不行,那么,如Authentification issue when push Xcode project to GitHub",试试使用如下网址:
If it is still not working, then, as in "Authentification issue when pushing Xcode project to GitHub", try to use an url like:
https://testuser:password@example.com/testuser/testproject.git
这篇关于Gitlab - Xcode无法连接远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!