XCode 4.2 SVN issues - xcode

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?

None of the above worked for me BUT here is what worked:
I continued to get the "untrusted certficate" 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.

I had issues similar to yours, I suggest you try:
Close Xcode + Organiser
Open your svn web address in Safari (not any other browser) - using the dns name
It should come up saying the address is untrusted as the cert is a different name / address
Click show certificate and then tick the box saying always trust then continue
it may prompt you for your mac username / password to add to the keychain
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!

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

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..:

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

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.

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 iOS5, 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.

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.

Related

Xcode Server won't build because source control information is in an invalid format

I have XCode Server set up with XCode 6.4 and OSX Server 4.1.5. I had integrations running fine until I transferred my git repository to another bitbucket account. No big deal right? Wrong for me :(. After I transferred my repository, I changed my git remote, I changed the repository location in Preferences in Xcode on my dev computer as well as on my server. Regular git functions are working fine from the command line and from within XCode. Nothing seems wrong until I try to run an integration and then it gives me the following build service error:
Could not check out sources because the source control information is in an invalid format.
I tried deleting my bot and creating another one. I tried cloning my project straight from the new location into another folder in case something had gotten out of sync. I git reset hard to the remote branch just in case even though there was nothing different. I tried cleaning and restarting everything multiple times. I reset XCode Server too (sudo xcrun xcscontrol --reset) and am still getting the error making me think I really did somehow mess up my git repository as far as XCode is concerned, but I have no ideas about what XCode doesn't like about my source control information. Does anyone have any ideas for what I can do or try? I've been tearing my hair out for hours.

Stuck on authenticating when uploading to App Store

I've seen a few other SO questions that are related to this; but I've been through all of the fixes with no joy.
My company had one Mac for use for the team. This worked absolutely fine. We really needed another so we have another. I exported the developer profile from the first Mac on to the second Mac. This seemed to work fine, we can test on local devices, etc. However, now we cannot upload on to the App Store from either Mac- they just get stuck on authentication with no error.
Things I've done:
Tried a different connection
Set the HTTPS proxy port to 80
Run the application loader and XCode at the same time
Regenerate our certificates and provisioning profiles
Set the build settings to various combinations of certificates and profiles
Turn it off and on again (more than once)
Update Java
Bump version and build numbers
Checked the licence agreement (no updates)
Deleted the XCode DerivedData caches
I can access the Apple developer sites just fine- developer.apple.com, the iTunes Connect stuff, all of that without trouble.
Some answers on StackOverflow suggested that we wait for some more time and be patient, others stated that restarting OR reinstalling Xcode should do the trick, but none worked for me. However, updating iTMSTransporter (Apple's command-line tool) worked for me, and if none of the above worked for you, I believe this one should ...
Simply create a back-up for the existing installation / folders, This is important because during the (new) install your previous installations will be removed by Transporter:
cd ~
mv .itmstransporter/ .old_itmstransporter/
Now run the following command to update Transporter:
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
Hope this helps somebody.
I solved this problem by erasing the private data using the builtin tool (Window -> Projects) and then deleting XCode itself and reinstalling.
Had the same problem, after update to xCode 7.0.1.
In my case, cleaning project DerivedData and reboot Mac OS fixed it.

XCode 5 - the local git repository could not be reached

I created a project with local git repository using XCode 5 (preview 6), made some changes and tried to commit, and finally got the message "The repository 'HelloWorld2' could not be reached, please verify that the repository is online and reachable and try again".
The same message is also shown when the Refresh Status menu item under Source Control menu is clicked.
Actually, I have XCode 4.5 installed and run side by side with 5.0, but the issue does not exist when the project is opened using Xcode 4.5. Also, the commit action works fine as well via command line.
Not sure if this helps in the tracking down of this problem, but here goes anyway:
I have been connecting to a local network git repository perfectly well for a number of months, but I encountered this problem later yesterday and nothing I did seemed to improve the situation. That included:
Rebooting both the development machine and the server;
Reinstalling Xcode from the App Store;
Re-cloning the project from the git command line (which could see the repository perfectly well);
Checking out the repository from Xcode (I was able to check out but every other operation, such as , Commit, Refresh Status etc. seemed to cause the problem...)
Manipulation the repository with SourceTree (which could also see it fine).
Eventually I stumbled across a solution to my local issue. If I launch Xcode with a wired and wireless network enabled then I can't see the repository. If I close it, disable wifi and relaunch it then I can.
I've not had much opportunity to work out what the difference is (especially as the wifi connects to the same network and is the secondary choice for networking) but it does seem to fix it.
Hope that might help others and hopefully I can find a real explanation soon!
Dave,

"Clone in Mac' fails on GitHub. Takes me to download page every time

I've reinstalled, uninstalled, restarted but "Clone in Mac' on any repository page fails and takes me to the GitHub download page every time.
It was working fine earlier this week but today won't do anything useful.
Any idea why?
It appears not only do you have to log in to the website, you have to log in to the application once as well so it knows you've got it installed. Then refresh the git repo page and the links will automagically change from the download page to an open-application page.
I tried the above suggestions of making sure I was logged in to both the site and the Github-Mac application (which I already was) and installing the CLI tools. This didn't fix it for me. After some digging I found this article which explains how it works.
There should be a server listening on your localhost with https://ghconduit.com:25035/status and it should return a json string that looks something like this:
{"capabilities":["status","unique_id","url-parameter-filepath"],"running":true,"server_version":"5"}
In my case I did not get a result so I tried 127.0.0.1 instead of ghconduit.com and that fixed it.
TL;DR: Add an entry for 127.0.0.1 ghconduit.com to your /etc/hosts file and refresh the github page you are on and the clone on desktop function will work.
As was noted in the comments: You must be logged in to Github for the "Clone on Mac" button work.
(This answer serves mostly to remove this question from the "unanswered" list, since the asker does not seem to be closing it)
Even doing all the above failed for me, but here's what did work:
Open a new tab.
Paste this in the address bar (without quotes):
"github-mac://openRepo/"
On the repo you want to clone, copy the HTTPS clone URL, and paste it after the link above. Press enter.
If the server is listening on your Mac #rjason-lindberg mentioned, then it should open up in GutHub for Mac.
I just had this problem, and I found two steps necessary to get it working: the "log in" answer above, and to open GitHub.app, got to Preferences > Advanced > Install Command Line Tools.
This took no time. I then refreshed the github page, and saw that the link now led to something like: "github-mac://openRepo/https://github.com/......"
Click it and it worked.
I have answered my own question: the trick is TO BE LOGGED IN on the GitHub website. As stated by Neil above, you need to be logged into the application too.
I just tried this and it seemed to work.
Go to Keychain Access and delete all stored passwords (Internet,
application, Web form) with reference to GitHub.
Login in fresh on to the site as well as from the Mac OS desktop application
Store the passwords this time
None of the other answers did the trick for me. But seeing that neither https://ghconduit.com:25035/status nor https://localhost:25035/status was able to connect I realized that the Conduit process wasn't running. It's in "GitHub.app/Contents/Library/LoginItems/GitHub Conduit"
open that, and clone to desktop finally works again.
Don't know why GitHub.app didn't start it by itself, but at least it works now.
edit: After each reboot the GitHub Conduit process needs to be manually started again.
None of the other answers worked for me. I tried logging out (both GitHub and GitHub for Mac), revoking the application access key, quitting the application, reinstalling the GitHub command-line tools (via the Preferences pane), etc.
What did work for me:
Clone (Edit: I think I might have meant "Fork"?*) the repository on github.com. (Yes, through the web interface)
In the GitHub for Mac application, access File > New Repository... and choose "Clone". Select the repo you just created on github.com and clone on, my friend! Clone on.
*It has been a while since I wrote this answer, so I'm not sure if I actually did mean "Clone"... I understand that forking and cloning are certainly not the same thing. I'll leave this answer here in case it happens to inspire a thought for someone!

XCode4 Override Repository Offline

I decided to try out the integrated version control feature in XCode 4 (using git). I have an ssh config file that looks similar to this:
Host server
Hostname server.example.com
Port 1234
When I add the repository to XCode I give it the url git#server:repo.git. It is able to clone the repo just fine. Now comes the problem. When I want to push commits to the remote repository, XCode tells me "Repository is offline" (with the little red light). It disables the "Push" button so it won't even try. However, I can pop open a terminal and push it from there just fine (git push).
Is there any way to tell XCode to back off and ignore that "error"?
Thanks.
It doesn't look like you can. XCode appears to be checking to see if it can resolve the name of the remote machine. A workaround is to add server to your hosts file so that it resolves the address. The ip address doesn't even have to be correct since it is discarded anyway when the ssh config file is read.

Resources