1

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?

2
  • Did you get a solution? Commented Feb 25, 2020 at 14:36
  • @SWAT Unfortunately no. Commented Feb 25, 2020 at 20:08

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

2

Select Open in Xcode

There might be an issue to add a GitLab account on Xcode. (also Xcode supports only RSA encryption and not the ed25519 as suggested by GitLab).

Until this is fixed here is a workaround I am using!

On the GitLab repository page you can select Open in Xcode and the website will ask where to save the project, and then open it in Xcode for you.

After making changes I would commit and push with the command line. Make sure that your Git username and email match your GitLab.com account for this repository, and an SSH public key was added to your GitLab.com account.

PS. I noticed that this option appear only if GitLab can recognise the repo as an Xcode project. For this to happen, the project and the xcodeproj file should should be in a root folder.

screenshot from gitlab open with Xcode

2 Comments

doesnt have that option, for my end
Right, I noticed that this option appear only if GitLab can recognise the repo as an Xcode project. For this to happen the project and the xcodeproj should not be nested too deeply I believe. (I updated my answer)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.