Xcode 4.2 SVN issues
Asked Answered
C

8

27

I am having trouble connecting my project repository to Xcode, ever since I've upgraded to 4.2. I have a local server with a forwarded port to be accessed from outside the local network. I have a DNS record pointing to the external ip. When I explicitly define the external ip (i.e https://123.456.789.000/svn/...) the repository is properly linked, no problems. This also works when I specify the internal address. The issue is when I use the repository dns - Xcode shows a red dot with "Host Unreachable". I am sure this is an Xcode 4.2 specific issue, because I tried this in other clients, including older Xcode versions. The basic problem is - the external DNS doesn't work with https.
Any ideas?

Clinkscales answered 26/10, 2011 at 15:23 Comment(0)
T
32

I had issues similar to yours, I suggest you try:

  1. Close Xcode + Organiser
  2. Open your svn web address in Safari (not any other browser) - using the dns name
  3. It should come up saying the address is untrusted as the cert is a different name / address
  4. Click show certificate and then tick the box saying always trust then continue
  5. it may prompt you for your mac username / password to add to the keychain
  6. Open xcode and try again using the DNS name..

The issue with xcode and accessing svn servers which have HTTPS certificates which fail any of the checks (be it host matching, self signed etc..). Opening the addresses in safari and adding as trusted solves this problem!

Tabard answered 2/11, 2011 at 17:16 Comment(3)
Weird thing is this didn't work for me. Had to use terminal and go svn co [url]...Cutie
Not working for me, any other solution or this is the issue it self with XCODE 4.25 and is resolved with xcode 4.3 ? pleas helpPentangular
This answer may need to be updated for the new release of Safari, because the dialog has changed. It no longer offers to add an exception for the certificate.Hui
E
41

None of the above worked for me BUT here is what worked:

I continued to get the "untrusted certificate" error in Xcode 4.2 -- i could see that a prompt is being presented as readonly in Xcode

So, I accessed my svn server site from via the svn command prompt utility and did a dummy operation:

svn co https://mysvnserver.com/project/

I saw the same error on the prompt as in Xcode:

Error validating server certificate for 'https://mysvnserver.com:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.svn.mysvnserver.com
....
....
....
R)eject, accept (t)emporarily or accept (p)ermanently? 

Now here is the key : I hit a p here to accept (p)ermanently, and I was able to access the repository via the prompt. Next, I opened Xcode and opened the repository -- everything worked flawlessly.

Ergocalciferol answered 18/11, 2011 at 7:4 Comment(7)
You could also use the command: svn list https://mysvnserver.com/ if you want to do the checkout from Xcode instead. This method this method worked for me, but accepting the certificate in safari didn't work.Leatriceleave
I needed to do this as well, as the Safari method above did not work for me. (Xcode 4.3.1, Lion 10.7.3)Frisby
Worked for me too, but since the certificate was renewed, I had to delete an old stored information from the ~/.subversion/auth/svn.ssl.server/ directory. Before, even with (p) entered svn asked every time again (and XCode didn't accept/work).Limicolous
Yes! Thank you. Billy Bob's answer did not work for me, but this did.Idona
Just had problems again on the 4.5.1 XCode, but this time this was the one that helped. Thanks again!Clinkscales
I had the same issue. This one helped but had to run as sudoBabbie
I think robbash's answer is correct. Remove this directory: ~/.subversion/auth/svn.ssl.server/ and use command line tools to commit a file and type (p). Then the problem will be solved.Cocke
T
32

I had issues similar to yours, I suggest you try:

  1. Close Xcode + Organiser
  2. Open your svn web address in Safari (not any other browser) - using the dns name
  3. It should come up saying the address is untrusted as the cert is a different name / address
  4. Click show certificate and then tick the box saying always trust then continue
  5. it may prompt you for your mac username / password to add to the keychain
  6. Open xcode and try again using the DNS name..

The issue with xcode and accessing svn servers which have HTTPS certificates which fail any of the checks (be it host matching, self signed etc..). Opening the addresses in safari and adding as trusted solves this problem!

Tabard answered 2/11, 2011 at 17:16 Comment(3)
Weird thing is this didn't work for me. Had to use terminal and go svn co [url]...Cutie
Not working for me, any other solution or this is the issue it self with XCODE 4.25 and is resolved with xcode 4.3 ? pleas helpPentangular
This answer may need to be updated for the new release of Safari, because the dialog has changed. It no longer offers to add an exception for the certificate.Hui
L
6

Run command in Terminal

svn info https://example.com/svn

It will then prompt you the "(R)eject, accept (t)emporarily or accept (p)ermanently?" Press p and problem will be solved

Leadin answered 12/9, 2013 at 9:32 Comment(0)
A
1

This is an Xcode 4.2 issue and you are just going to have to wait for an update from Apple or go back to a previous version. While these links (which you've probably already read) may not solve the problem, it may at least give you further information

Setting up SVN repository in XCODE 4.2

After upgraded to Xcode 4.2, Organizer - SVN repository stopped working

https://discussions.apple.com/thread/3375258?start=0&tstart=0

Angelynanger answered 30/10, 2011 at 1:43 Comment(2)
Thanks Joel, I will keep looking into a possible workaround until the bounty expires. If indeed there is no way to achieve this, I will mark your answerClinkscales
I wish it were the simple but I was able to resolve it but simply using the HTTP protocol and forcing re-authentication. Worked like a charm after several days of hair pulling.Tabitha
D
1

You could enter your url using the port number instead of the https scheme (http://someurl.com:443/svn):

  • After clicking Next, Xcode shows that it can resolve the hostname:

  • Enter repo credentials and paths, etc..:

Darlleen answered 30/10, 2011 at 4:5 Comment(3)
Hi chown, thank you for your answer. I put in these details and the repository does appear to be linked with a green indicator, but once I want to do a checkout, I see no files / revisions.Clinkscales
Hmm, maybe this doesnt work then. I was hopeing xcode would recognize ssl by the port number (and not just httpS) but I guess not. Sorry @stavash, Ill play around with this more and see if I can get it working because I just noticed this happening on one of my old project repo's as well.Darlleen
This worked for me. HTTP somehow cleared out the HTTPS settings and re-authenticated. Worked like a charm, thanks.Tabitha
S
1

Few times SVN part of Xcode behaves abnormally. If your network speed is bad, Xcode doesn't update the file status properly. (From past exp.)

I suggest you to try either svnX or SmartSVN clients.

As said in above responses, do check your server URL in a browser. It really helps if you are pointing to proper svn server URL or not.

Starspangled answered 29/12, 2011 at 8:26 Comment(0)
W
0

I've searched for days and in the end figured that it's a bug. I'm waiting for the next update for Xcode. In the meantime, I'm making do with SmartSVN....

If you really do need to use the SVN functionality in the IDE, I suggest downgrading Xcode but then you will not be able to build to iOS 5, which I'm sure you want to....

Your best bet is to file a bug report (which many have done already) and wait and watch.

Wiburg answered 1/11, 2011 at 17:22 Comment(1)
Thanks Sid, I'm using SVNX for now and waiting for a fix. Will file a report too.Clinkscales
A
0

What about just navigating in a terminal window to ~/Documents/[projectname] and doing the svn commit from there? You should get prompted to accept the cert.

Perhaps Xcode does some things behind the scenes that make this a bad idea? I just don't know if there is any difference between doing your commits within Xcode (i.e. File > Source Control > Commit) or just doing it from the command line. I've done both before and haven't noticed any problems.

Agata answered 7/12, 2011 at 2:13 Comment(1)
There was no problem using the command line or an external utility (i.e. svnx). It was a matter of convenience using it integrated with the IDE. Thanks anyway!Clinkscales

© 2022 - 2024 — McMap. All rights reserved.