Search code examples
xcodegitlabxcode10

How to connect to the Gitlab account in Xcode?


I am choosing Xcode, Preferences, '+', Gitlab Account. Then I have tried lots of combinations of the Account and Token. In the Token filed I am entering the token I have generated (should it be named after the project I am going to connect?). In the Account field, I have tried to enter the mail connected with the Gitlab account, Gitlab username. However, nothing works. Please, can you help me?


Solution

  • From the Source Control navigator add the remote url of your project in GitLab. This would setup Xcode to identify where to push the commits to. Instead of adding the User Profile through Preferences (did not work for me), just go to Source Control -> Commit, and commit locally, and then Source Control -> Push to push to your repository. At this point, Xcode will ask for your username and password, just enter your credentials there and it would work like a charm from there.

    I still do not have an answer to why I was not able to add the credentials via Preferences, but this works too.