Question

I recently upgraded my Xcode to 4.2. Since then my Organizer-Repository stopped working. Initially it said "Host is unreachable" and placed red dot every where.

In the same Mac 10.6.8, i do have SvnX and it works with same SVN location without any problem. I also tested this in Safari and found it is working (Server supports VisualSVN). Only Xcode is finding problem with this location.

I even appended my private/etc/host files with svn.ip.address my-svn-pet-name and used that in my xcode following this post. Doesn't work.

My repository is connected over a specific port 8080. I gave ip-address in svn url as http://my-svn-pet-name:8080/...

Any help is highly appreciated.

UPDATE: To isolate the issue, i tried to connect http://gdata-objectivec-client.googlecode.com/svn/trunk/ from xcode organizer and it works without any problem. I didn't supply any user-name and password for this location. However, my repository requires authentication, in my recent tries when i select the short-cut on left pane, the dot-icon next to trunk, branches and tag glows green. However, when i click 'root' and tried to expand 'trunk' it says 'Unable to load revisions'

UPDATE 9/9/11: Uninstalled xcode using command sudo /Developer/Library/uninstall-devtools --mode=all and Restarted the mac and Re-installed Xcode 4.2.

When i open Organizer, contrary to my expectation, all svn shortcuts are intact and the issue still persists.

Was it helpful?

Solution

The problems are only with the latest XCode 4 (build 4C177 — iOS 5 beta 7).

A slightly earlier version of XCode 4 (build 4C104 — iOS 5 beta 5) works fine.

Like Saran, I tried the suggestions from majkelx and OMH and they did not work for me.

When I launch build 4C177, and immediately open the Organizer, the repositories initially show green (as Saran noted) and histories are available. Any other operation turns them red. But the comparison view in the text editor successfully shows diffs against the repository, with revision number.

So, I conclude that the repositories are set up OK and authentication is actually working, but various source-control functionality in build 4C177 is buggy. I'd advise installing an earlier XCode 4 and waiting for the next release. I filed a bug report with Apple.

OTHER TIPS

  1. Close Xcode and all of Subversion clients
  2. Go to Keychain Access.app
  3. Search for all 'svn' entries.
  4. Delete all which can be related to your repository (assuming that you remember users and passes)
  5. Checkout project from the command line (Terminal.app) (to be sure, I use svn which goes with Xcode in the example below, may be You have installed another svn command line from macports or sth?)

    /Developer/usr/bin/svn co  http://my-svn-pet-name:8080/... tmp-dir
    
  6. Provide users and passes when svn asks for them.

  7. Go to Keychain Access.app again and for newly created entry (search for svn again) in details/Access Control, give access to password for all apps (this's not needed in 99% of cases but can fix issues with svn versions and other subversion clients mismatches).
  8. That's it. Xcode should see your repositories again, or after recreating shortcuts to them in Organiser.

Tried everything, "Host is unreachable" all the way.

The following fixed it instantly for ME (using a https connection(!)):

  • Enter your repo address in Safari (only server address might work, as well).

  • When Safari warns you about trusting the server, "always accept" the certificate.

  • Restart Xcode. Done. Works.

I have been having the same issues, starting with beta_7 (previous betas of 4.2 did not exhibit the issue). I upgraded to the GM of 4.2, and still the same.

I discovered what was happening in my situation. The URL endpoints I've been used are SSL (https://my-svn/etc/etc). When I logged in via Safari to test, I was being presented with the "cert might not be valid" warning, then I continued past this and was able to enter my creds and could see the repository structure (as expected).

I initially thought that the cert being used on the server had expired, and Xcode was honoring the warning behind the scenes. Next time I tried with Safari, I chose the "View Certificate" in the warning, and saw that the cert was still fresh (2018 expiration date), but that our self-signed cert was not pointing to a Certificate Authority, and Safari was reporting that my Mac did not trust that cert. So, I chose the "Always trust" options that are presented by the dialog, and the warnings went away in Safari. The "forced trust" is established in the Mac's Keychain, so then I launched Xcode and viola, all of the associated repository entries in Organizer glowed green.

I had the same problem using VisualSVN.

I could connect to is over HTTPS://mysvnserver:8443/ where I then was requested for a user/pass combo.

In Xcode the connection always failed. Sometimes Xcode would complain about the certificate not being issued by a trusted authority, which in my case would be correct.

The certificate is in my keychain as always trust but that didn't solve the issue.

My solution:

  1. open an terminal window
  2. type command svn co https://mysvnserver:8443
  3. A request is issued for the certificate security press P to allow permanent.

Xcode 4.2's SVN is well and truly broken.

svn from the command line works just fine, so I don't see how it can be an authentication issue -- it's just a straight bug and a demonstration of how much testing Xcode releases receive these days... The Xcode 4 series has been a lot of backwards :-(

SVN in Xcode 4.1 was almost working properly.... And now it doesn't work at all. Whee!

Had the same problem. The dots are green in the list of repositories but it just refuses to commit changes or update status, though compare works fine.

I opened Repositories, then on the left pane selected the project under the repository item. In the bottom-left of the window you'll have two buttons, Update and Commit. I pressed Commit there and it worked fine. However, after that it still wouldn't commit through the project (Alt+Cmd+C or through File menu). Not sure exactly what's going on.

When you use any IP to access SVN, XCode sends local user's credentials and SVN cannot authorize user;

You just need to create an alias for your IP in hosts and use that alias in URL instead of IP. A comprehensive manual of how to make aliases you can find here. At the end my URL looked like http://svnserver:8080/svn/....

After upgrading to Xcode 4.2, I had the same problems, red dots, and "host unreachable".

I tried the recipe from majkelx, but those dots where still red.

But then I just tried to check out the repository with the Xcode organizer instead of the command line. And suddenly it all worked!

(It may not have worked without fiddling with the Keychain, like majkelx described)

EDIT: When searching for Subversion entries in keychain, also seach for "sub", not just "svn". My passwords where in "subversion". Only my web subversion password was in "svn". Just one more hint for others who are struggling with this. I wasted more than an hour on this today. :-)

I have this same issue, with Xcode 4.2 (Build 4D199) being able to connect initially (green lights) then losing connection shortly after (red lights). But this only happens when I am connected to the same LAN as the SVN repository using a cable. If I switch to a wireless connection, Xcode is able to connect again (green lights). In all cases I am able to ping and connect to SVN using the terminal and other SVN tools. It is just Xcode that struggles. You could try going wireless or through VPN to bypass this problem.

Try remove the "https://login@" from your svn address Works for me.

for http://my-svn-pet-name:8080/ try something like my-svn-pet-name:8080/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top