Xcode 13 git pull fails with "The project you were looking for could not be found..."

I have a project open in Xcode 13.4.1. The project has a git repo, and I can interact with it perfectly through a command line. Inside Xcode it lists the same repo (loaded from GitLab over SSH with keys set via .gitconfig), the remotes and branches are visible, all looks good. When I go to Source Control -> Pull... and select the remote I want (origin/main), it fails with this error:


An unknown error occurred.
ERROR: The project you were looking for could not be found or you don't have permission to view it.



In a terminal, if I cd to the same directory and run `git pull`, it works fine. Similarly I can open the same project in a JetBrains IDE and git pull works fine from there too.


Is there some special incantation I need to make XCode use this repo?

Posted on Jul 7, 2022 1:19 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 7, 2022 4:48 AM

Make sure your gitlab account is setup in Xcode preferences > Accounts. Without that, Xcode will be able to see all the git information because it is stored in the project’s git config, but it won’t be able to perform any accounts. Xcode does not use any information from the command line environment.

Similar questions

5 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Xcode 13 git pull fails with "The project you were looking for could not be found..."

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.