7

I'm trying to add a remote linux SVN repository to my project but when I enter the server address I get the message Host is unreachable.

I'm entering it like

svn://ip_address/myproject/ 

From terminal I can do this

svn list svn://ip_address/myproject/

and it shows the contents without any issues.

10

I had this problem as well in linking to a Git repository. It seems XCode has some issues with IP addresses. I found that by modifying my hosts (/private/etc/hosts on Mac) file and adding an entry for the repository's IP address does the trick.

Hosts file entry:

i.p.add.ress  serverName  #where i.p.add.ress is your ip_address

In the Location field in XCode:

svn://serverName/myproject

The comments above referencing the other question's answer doesn't cover the IP address issue. Hopefully this will fix your issue too.

| improve this answer | |
  • This fixed it for me for our local svn server. – DonnaLea Aug 4 '11 at 2:34
  • I edited the hosts file and created a remote with the 'human readable' host name (not the IP address), but when I click the disclosure triangle in Organizer/Repositories for the remote, I get the message "bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly". When I choose File>Source Control>Push, the repository appears as offline ("No Remotes Found") – Nicolas Miari Jun 13 '12 at 15:47
0

To modify the host file you open the terminal and put this command:

sudo nano /private/etc/hosts

Now you have opened with "nano editor" the file hosts, add IP, save and close. After you put this code in the terminal to reflush dns:

dscacheutil -flushcache

END!

| improve this answer | |
  • Alternatively, you can navigate to the hidden folder (finder > Go To Folder), open the hosts file on your favorite, non-vim, non-emacs text GUI editor (rad-only), save it to a different location (e.g., the desktop), making it writable, modify it, and drop it back to the original location (must authenticate on overwrite). – Nicolas Miari Jun 13 '12 at 15:50
0

This is probably not the solution to the issue the original poster was experiencing, but the same error message can be received for a different reason, which is why I post this.

Xcode has trouble with ssh login banners.

Quite simply, if your svn server is accessed via svn+ssh and is making use of a login banner, Xcode will state that your repository cannot be reached. Comment out the Banner entry in /etc/sshd_config, and there should be one less reason why you cannot reach your repository.

| improve this answer | |
0

I also came across this with hard luck. How I fixed my broken repository is as follows.

  1. Start XCode and check out or clone a new repository.
  2. Copy the git HTTPS clone URL.
  3. Paste into the Xcode field and remove the "S" of HTTPS.
  4. Press clone button
  5. When the "verify Certificate" popup appears make sure to set it to "Always Trust"
  6. If needed to enter git username password save that to the keychain.
  7. In the original "broken repository" Open the XCode organizer click the remotes folder and expand "origin"
  8. If no branch appears enter username and password and the remote will now appear

Hope this helps

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.