Gitlab - Xcode Can't connect with remote repository

mzurita picture mzurita · Nov 28, 2013 · Viewed 45.2k times · Source

I am having troubles when I connect with my repository through Xcode.

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.

The git url project are:

HTTP: http://example.com/testuser/testproject.git
SSH: [email protected]:testuser/testproject.git

I can see the repositories folder rightly created with a "Terminal" through SSH connection.

Now, I want add this git repository to my Xcode repositories.

So, In

XCode > Preferences > Account     

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."

Could anyone help me?

Answer

VonC picture VonC · Nov 28, 2013

The user/password would only be needed for an http url, not an ssh one.

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.

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:[email protected]/testuser/testproject.git