Reputation: 7031
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?
Upvotes: 12
Views: 36698
Reputation: 51
Credit to "makdiesel" who actually found this solution (which was the only one that worked for me)
Open your /etc/hosts file and comment out the IPv6 lines (sudo vi /etc/hosts):
#::1
#fe80::1%lo0
Clear the dns cache (sudo dscacheutil - flushcache)
Re-start Xcode and your SVN repositories should be working again.
Upvotes: 1
Reputation: 54251
NaJeWang
's answer pretty much nails it, but for me it was as simple as
And that did it!
Upvotes: 0
Reputation: 260
I you have checked out the project already, just remove the repo Organizer and open a terminal with the project directory.
Now type:
svn list
This will ask for the svn credentials and svn integration for this project should work in Xcode now.
Upvotes: 0
Reputation: 963
I had this problem when I moved my SVN server from one box to another. Xcode refused to accept the credentials added onto the repos page.
The solution I found that worked was to remove the repo from the list, quit Xcode, then open the source-controlled project again.
This then correctly prompted me for the SVN password. After this, it all worked fine.
Upvotes: 0
Reputation: 138
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.
Upvotes: 2
Reputation: 578
I had a similar problem; was working in XCode 3 blah blah...
I followed all the instructions here and here but still it was hanging.
The problem was that my svn username and my mac OS username and password were the same. Once I'd changed the name of my svn user it worked!
Hope this prevents anyone else spending a day's work on this
Upvotes: 0
Reputation: 2457
Having just spent the morning fighting with XCode and SVN, I think I have a solution that does not require using any terminal prompts. This is for connecting to an existing repository.
Done. It seems to require two connection attempts before it works. I've tried this on a couple different computers now and it's worked every time.
Upvotes: 1
Reputation: 160
If command line svn uses KeyChain (default on MacOS) and sill ask you about svn password this could be an solution:
~/.subversion
configuration folder (default settings, backup and delete folder to be sure)Key Chain.app
Upvotes: 1
Reputation: 211
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).
Upvotes: 21
Reputation:
http://plainoldstan.blogspot.com/2011/03/xcode-4svn-could-not-authenticate-to.html
Seann is right, it was an issue that the SVN credentials hadn't been cached in an "Xcode 4-friendly" manner.
This fixed it for me. Basically, what I had to do was:
svn cleanup
to remove any locks.svn commit
with either -m "Commit message here"
or --editor-cmd=anEditorIUse
. I used the latter, because I like vim
.
Hallelujah.
Upvotes: 1