Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 + SVN = working?

Tags:

xcode

svn

xcode4

I have a VPS with Centos running. I have setup subversion on the VPS. While setting it up in Xcode, Xcode reports that everything is fine. When I import a project however, Xcode gives a warning:

Authentication realm: <svn://**********.net:3690> **********-**********
Password for 'svn': 
Authentication realm: <svn://**********.net:3690> **********-**********
Username: svn: Can't read stdin: End of file found

I can't even create directories, but Xcode reports that it can connect to it fine. I have put in the correct user name and password.

I am able to get a third party plugin working in visual studio working at the same address so I know it's not the server that's giving problems. I've uploaded some files using visual studio.

Has anyone got subversion working in their xcode 4?

like image 380
ninjaneer Avatar asked Mar 21 '11 10:03

ninjaneer


People also ask

Does Xcode support SVN?

Bookmark this question.


2 Answers

Ever since I started using Xcode I've had no problems connecting to my subversion repository using an ip address instead of the hostname. eg. http://192.168.1.xxx/svn

When Xcode 4 came out for Snow Leopard, it worked fine as well. But since upgrading to Lion and the updated Xcode 4, whatever I did it refused to connect to the repository. I could connect without a problem from the shell with 'svn list http://192.168.1.xxx/svn', but not from Xcode. I tried removing the password from the repository. That didn't work so I put the password back in.

I tried removing any references to the repository from my keychain, but that didn't work either. It wouldn't trigger an authentication window in Xcode. Using 'svn list http://192.168.1.xxx/svn' from the shell gave me the authentication window, and it connected successfully. It added an entry into the keychain, but Xcode still didn't work. I tried adding Xcode to the access control list for the new keychain entry, and that didn't work either.

I found another thread here with a small comment about adding an entry for the svn server to the /etc/hosts file, so I thought I'd give that a go.

192.168.1.xxx   Subversion

After adding this line to the hosts file, everything started working perfectly in Xcode using http://Subversion/svn to connect to the repository. Connecting from the shell worked fine as well.

It's probably worth mentioning that the new keychain entry shows 2 entries in the access control list for svn. One entry pointing to /opt/local/bin/svn, the other to /Developer/usr/bin/svn. After restarting Xcode, it requested access to the keychain. Now there is a third entry in the access list for Xcode. I tried adding these 2 entries that were added by Xcode to the access list for the keychain entry using the ip address, but Xcode still didn't work.

Over the years I've seen some strange behaviour in OSX when authenticating to devices using an ip address. My web browser would sometimes find the keychain entry for my router when accessing it using an ip address, and other times it wouldn't. So to avoid all the wasted hours trying to diagnose these sorts of problems in the future, I'll be using the /etc/hosts file from now on.

like image 41
Fogger Avatar answered Oct 21 '22 00:10

Fogger


I solved the problem this way

1.open a terminal

2.type 'svn list svn://~~~paths'

ie. "NJW-Mac:~ bluepin$ svn list svn://192.168.0.184/BMA"

3.You will need to enter PCUserPassword,svnUserID,svnUserPassword

4.U should see output from the svn list command which means you were able to connect to the SVN server

5.return to xcode4

6.try again your job(connect Repositories)

If u access your SVN repository from the terminal once it should allow you to connect to the repositories using Xcode (I suspect the subversion credentials have to be cached somewhere).

like image 168
NaJeWang Avatar answered Oct 20 '22 23:10

NaJeWang