Post-installation of 10.8 and Xcode 4.4 when I try to push to a remote using the Xcode integration Xcode is telling me 'no remotes found'. I am still able to push successfully via command line so my actual repositories are fine. I've installed the command line tools and have tried restarting Xcode several times. Additionally, if I go to Organizer and try to select the repository all I get is a spinning activity indicator. If I select 'remotes' for a given repository it's blank. Note that Xcode does recognize git is available though as it does show which files are modified and allows commits. Reported system git version in /usr/bin/ is:
git version 1.7.9.6 (Apple Git-31.1)
Is anyone else experiencing this, or do you have any suggestions for a remedy (or at least a place to look at a log to see what is going wrong)?
UPDATE 10/18/13
This issue has been resolved in Xcode 5.
When you add the remote repository in Xcode or in command line (doesn't matter from where you add it) make sure that you use the full path for your repository.
E.g.:
From commandline it's enough to specify
when your example.git is located in gituser's home directory. However Xcode can't deal with this annotation and says "No remotes found" when you try pushing your commits to this remote repository.
In order to satisfy Xcode you should type the whole path like:
I've had the same issue with SSH defined hosts.
My
~/.ssh/config
looks like this:My repository remote URL was in the form of
ssh://myGitServer/git/project.git
The problem was that XCode did not read the SSH config to resolve "myGitServer" so the repository was always "offline" for it. I ended up adding "myGitServer" to
/etc/hosts
.I guess that among other things, the "no remotes found" issue is caused when XCode can't directly resolve the name of the GIT remote server.
I had a similar problem where remotes were failing to load, specifically for kiln as the remote host. Looking in the git config for the repository info, the URL had been changed to prepend my email address to it.
So I simply exited Xcode, and then from the command line did:
And that seemed to fix it when I restarted Xcode - both pull & push worked again.
I have no idea why Xcode corrupted the URL. This was with Xcode 4.6.3
Xcode 10.2.1
Double Check:
1) Git Acc under preferences. 2) cmd + 2, right click under remote to create a remote.
I have found this solution for Xcode with Git:
1) remove old remote
2) add new remote:
remote name: origin
location: same as before, but replace all ":/" or "//" by "/" only
I had the same problem with Xcode 4.6.3.
Here are the steps I performed to resolve the problem:
1. In Xcode I went to File -> Source Control -> Repositories (which opens the Organizer)
2. I then selected the Remotes object from the tree for the Repository I was having the problem with.
3. My remote was named origin, however when expanding it, I noticed it did not have a Branch associated with it.
4. I then selected the remote origin and pressed the Remove Remote option, which removed the remote origin from the view.
5. I then went to a terminal and re-added the remote with:-
6. I then needed to add the branch(es) to this remote, which did not worked correctly initially, so I then forced it using the -f command. The command I used was:-
Note: It may have been possible to skip steps 4 and 5 and just go straight to step 6. I had removed the remote, so did not have the chance to test this.
Note 2: You will need to restart Xcode (or possibly just the Organizer) to see that the remote and branch are now available.