XCode 5 - the local git repository could not be reached - xcode

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,

Related

XCode - my project is empty after I restart my Mac

I got this very weird problems these days on XCode (8.3.2 8E2002):
My XCode project is working well with Bitbucket source control. Some days ago, after booting up my Mac, all files in my project are gone, its project folder name became <myprojectname> (1). Then I cloned it from Bitbucket and was able to work on it, committed, ...
I find that every time I restart my machine, the symptom comes back and I have to redo cloning from Bitbucket, work, commit, ...
Previous XCode versions never had this kind of issue before. Has anyone got it? What's wrong with my XCode/Bitbucket? How can I fix it?
Thanks

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.

Xcode 5: The repository could not be reached

I have this issue with Xcode 5 where I'm trying to commit a file to a remote git repository (BitBucket) and getting a pop up window with the following error: "The repository "project_name" could not be reached. Please verify that the repository is online and reachable and try again."
I've been working with this setup for awhile now (since Xcode 4) and didn't have any problems with it. Under Xcode->Preferences->Accounts->Repositories I saw the correct repository, but duplicated. I deleted and added it again, but it didn't help. I tried closing the project and rebooting the computer and it didn't help either. I can see the project's history under Source Control->History. I can access the repository on BitBucket.
Any idea where this is coming from and how to solve this issue?
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,
Well it seems this had nothing to do with Bitbucket.
The problem was a messed up .git folder on my machine.
My project resides in a Dropbox folder. Somehow, perhaps because of accessing it from different machines, it created copy/duplicate files in the .git folder and it messed up Git. After fixing all the conflicts Git returned to working as usual and I was able to commit from Xcode to the remote repository.
Now, if you encounter this issue, you might not have the same setup as mine or work on Dropbox or any similar service, but I strongly recommend checking your Git folder thoroughly. Good chance something is messed up there.
Check internet connection of system.also quit xcode and reopen it.

XCode 5 does not show full SVN history for repo

XCode 5.0.1 on OSX 10.9 does not show the full revision history for my repository under Source Control/History.
What it does display is the history up to a certain point several months ago, but nothing newer than that.
I tried viewing the repo and its history in Versions and there it works just fine.
At some point we migrated the repo from one server to another. We also upgraded the repository a while back, but I don't know to which version of SVN. However, I do know that we have Visual SVN Server and SVN 1.8.0 serverside.
On the other hand, the XCode 5.0 release notes state that XCode uses SVN 1.7, which leads me to suspect that this could be the cause of my issue. However, I also seem to remember that XCode used to refuse to work with unsupported versions of SVN.
Any ideas what could be causing the problem?
What sucks, but is the default in Xcode is that the server status is not automatically updated.
Open the preferences and go to the Source Control Preference and make sure the "Refresh server status automatically" button is checked.
There is nothing I can find within the Xcode UI besides this that tells you the server history is current or how to refresh it.
This is verified as of Xcode 5.1.1. What a shitty UI. Really.
Cheers.
In my case sometimes begins work after "Source Control/Update".
Actually, its terrible bug, you have no guarantees that you see actual list!!!
To answer my own question, it appears that there was something wrong with the working copy. Deleting it and then doing another checkout directly from XCode fixed the problem.
Yet another variation on 'turn it off, then on again'.

XCode 4.2 SVN issues

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.

Resources