Xcode 4.4 - no remotes found

前端 未结 8 2098
失恋的感觉
失恋的感觉 2021-01-18 11:29

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 successf

相关标签:
8条回答
  • 2021-01-18 12:09

    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

    git remote add <name> gituser@gitserver:example.git
    

    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:

    git remote add <name> gituser@gitserver:/home/gituser/example.git
    
    0 讨论(0)
  • 2021-01-18 12:18

    1- search and apply the guideline. which is mentioned about "show all hidden files in mac finder". and delete .git directory (this folder wont appear without solving article-1)

    2-XCode>Prefences>Accounts>Delete github account and close xcode. than open and reconfigure same github account by adding all over.

    3-click the section small icon namely "source control navigation" (which is near the project navigator). as you right click a popup will appear. and choose create blabla on github". actually this steps solved same issue.

    0 讨论(0)
  • 2021-01-18 12:21

    I've had the same issue with SSH defined hosts.
    My ~/.ssh/config looks like this:

    Host myGitServer
    HostName {real address goes here}
    {Some more config for the host here}
    

    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.

    0 讨论(0)
  • 2021-01-18 12:24

    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:-

    `git remote add origin http://username@localhost:7990/scm/iac/main-repository.git`
    

    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:-

    `git push origin master -f`
    

    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.

    0 讨论(0)
  • 2021-01-18 12:25

    you need first add a remote repository: git remote add yourname https://github.com/user/repo.git

    and than push... and xcode find the remote repo and can push too.

    0 讨论(0)
  • 2021-01-18 12:27

    I have found this solution for Xcode with Git:

    Organizer > remotes > origin

    1) remove old remote

    2) add new remote:

    • remote name: origin

    • location: same as before, but replace all ":/" or "//" by "/" only

    0 讨论(0)
提交回复
热议问题