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

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!

Related

Cloning a private Repo hangs for new 2.32.0.windows.1 version of git

Question:
Why does git-bash hang when cloning a non-public repo when installed with defaults?
Context:
I ran into this issue when trying to clone a private GitHub repo on my co-workers Windows 10 machine.
Steps to reproduce:
Installed the newest version of git bash for Windows (for at the time of writing this post for me was 2.32.0.windows.1). Choosing all of the defaults.
Run git clone [http-link-to-private-repo]
Expected:
A popup to enter username and password information.
My Hack Solution:
When installing 2.32.0. for windows check the "Enable experimental support for pseudo consoles.".
This allows the bash console to present you an option to authenticate via a web browser or a personal access token.
Unrelated Note:
I originally was looking to post this on the Github Issues page for Git but they don't have one so here I am. Not sure if this is the appropriate place to post this but I wanted it somewhere so another person doesn't run into the same trouble.
Many thanks this was the solution after everything else failed including setting up a new installation, a new access token, and trying to find faulty config files.
After updating my personal access token this behavior also occurred with git 2.28.0.
So i did an update to the newest git version and afterwards the above mentioned steps.
(Sorry, i can not make any comments directly.)
I also ran into this problem setting up my dev environment for a new work laptop... Thankfully I had an older Windows GitBash installer (2.31.1) so I ended up downgrading to the older version. Worked like a charm, for me but understand it may not be an option for everyone.

visual studio git: terminal prompts disabled

I cloned a VSTS (NOT GitHub) repository with bash on windows using URL like https://myproj.visualstudio.com/repo and now I'd like to be able to use in-built VS2017 git window for my work, however when I do say Pull I get a window asking for my username/password and after I provide them I get this error:
Git failed with a fatal error.
could not read Username for 'https://myproj.visualstudio.com': terminal prompts disabled
which doesn't make any sense to me, I'm still able to do everything from git bash, I was also able to use VS2017 in-built window until today (we had some accounts migration which I'm not aware of the details), I tried relogging everywhere (at least what I'm aware of) and reinstalling git/visual studio, but still no success. All the suggestions I was able to find are either related to GitHub or suggest me to use ssh, which I don't want to, because my colleagues still have it working quite fine with https as before
A workaround for me was to download and install TortoiseGit and then get a repository cloned through its credential manager. Afterwards, I connected to the repository within Visual Studio 2017 as a local repository.
In this approach we have to use TortoiseGit for all repo operations.
Better to try these instructions, which completely resolved my issue:
https://www.danielcrabtree.com/blog/176/how-to-fix-fatal-error-with-git-in-visual-studio-2017
Turns out I had to delete contents of this file:
C:\Users\my_user\.ssh\known_hosts
I didn't see it documented anywhere, it was just one of my numerous random attempts to fix things

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

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