You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a clean (fresh, no previous copies) installation of GitHub Desktop beta for Mac, I am attempting to login to using the GitHub Enterprise option. The login supposedly works, as no indication of failure is given, however when attempting to do an action, it then fails saying that I am not logged in.
Version
GitHub Desktop version: 0.5.7
The operating system you are running on may also help with reproducing the
issue:
OS version: 10.12.5
Steps to Reproduce
Install GitHub Desktop beta and launch the app
Click on "Sign into GitHub Enterprise and enter the server address
In my case this tells me "Your GitHub Enterprise instance requires you to sign in with your broswer"
Click on "Sign in using your browser"
A new browser tab opens and a pop-up appears, providing me the option to "Open using the GitHub Desktop app"
The app screen then changes with my Name and Email fields filled
Click on "Continue" and "Finish"
Select to add a repository from disk (this repository was previously cloned using Tower)
The repository gets imported, however I see the following in the Developer Tools:
If adding the same repository by cloning it from GitHub Enterprising using its SSH URL, no errors appear.
Expected behaviour: For a locally-added repository to be able to work with its parent GHE instance
Actual behaviour: Error appears in log and unable to perform actions (such as fetch) on it, when using GitHub Desktop beta.
@IdanAdar And this particular repository is using SSH, right? It looks like the GitHub Enterprise host key is being rejected
Host key verification failed
We haven't done a whole lot of testing with ssh yet and I'm assuming that either ssh isn't able to find the known_hosts file or your enterprise host has recently changed host keys and the new key is not in the known_hosts file.
idanadar@mbp-idan:~$ ssh -T [email protected]
Hi IdanAdar! You've successfully authenticated, but GitHub does not provide shell access.
idanadar@mbp-idan:~$ ssh -T [email protected]
Warning: the ECDSA host key for 'github.ibm.com' differs from the key for the IP address '****'
Offending key for IP in /Users/idanadar/.ssh/known_hosts:12
Matching host key in /Users/idanadar/.ssh/known_hosts:17
Are you sure you want to continue connecting (yes/no)? yes
Hi IADAR! You've successfully authenticated, but GitHub does not provide shell access.
This repository was cloned using SSH in Tower. In Tower, these actions work.
The same cloned repository, when locally imported into GitHub Desktop beta, fails to connect to the remote repository.
The same repository, if SSH cloned in GitHub Desktop beta, works.
So the problem is only with importing an already SSH cloned repository.
Are you able to fetch using GitHub Desktop now that you've explicitly accepted the new key?
No.
Observation:
The same (Tower-cloned) repository, when locally imported into GitHub Desktop beta - fails.
The same repository, if SSH cloned in GitHub Desktop beta, removed and locally imported back - works.
Is there anything from the Tower-cloned repo I can provide that might explain this? Could it be that the cloned repos are not identical in some manner?
But this repo isn't a Private repo. It's just a repo, in GitHub Enterprise.
I suppose this is not critical, as one could just re-clone the repos... but it's one less convenient migration to this git client, for an already cloned repo (and since we don't have mass-clone/import option it's even less convenient...).
Activity
shiftkey commentedon May 24, 2017
@IdanAdar which version of GitHub Enterprise are you trying to connect to?
IdanAdar commentedon May 24, 2017
GHE 2.9.
niik commentedon May 24, 2017
@IdanAdar And this particular repository is using SSH, right? It looks like the GitHub Enterprise host key is being rejected
We haven't done a whole lot of testing with ssh yet and I'm assuming that either ssh isn't able to find the
known_hostsfile or your enterprise host has recently changed host keys and the new key is not in theknown_hostsfile.Could you open a terminal and test your ssh connection and see if that works.
After you've done that could you try switching your repository to using https and see if that works.
IdanAdar commentedon May 24, 2017
This repository was cloned using SSH in Tower. In Tower, these actions work.
The same cloned repository, when locally imported into GitHub Desktop beta, fails to connect to the remote repository.
The same repository, if SSH cloned in GitHub Desktop beta, works.
So the problem is only with importing an already SSH cloned repository.
niik commentedon May 24, 2017
I suppose that it's possible Tower either has its own ssh key management or simply tell ssh to disregard any key validation errors.
Are you able to fetch using GitHub Desktop now that you've explicitly accepted the new key?
IdanAdar commentedon May 24, 2017
No.
Observation:
Is there anything from the Tower-cloned repo I can provide that might explain this? Could it be that the cloned repos are not identical in some manner?
tierninho commentedon May 24, 2017
Per Tower, fyi:
https://www.git-tower.com/help/mac/manage-repositories/clone-remote-repository
IdanAdar commentedon May 24, 2017
But this repo isn't a Private repo. It's just a repo, in GitHub Enterprise.
I suppose this is not critical, as one could just re-clone the repos... but it's one less convenient migration to this git client, for an already cloned repo (and since we don't have mass-clone/import option it's even less convenient...).
tierninho commentedon May 24, 2017
Thanks for the correction @IdanAdar
Maybe this is helpful?

https://www.git-tower.com/help/mac/remote-repositories/connect-authenticate
IdanAdar commentedon May 24, 2017
Maybe. But I don't understand in what way. :)
joshaber commentedon May 24, 2017
I feel like I'm starting to sound like a broken record, but I wonder if this is related to us not inheriting the shell environment.
To be clear, you're using File > Clone Repository… in GitHub Desktop and entering the SSH URL to clone it?
Do you know if you have anything special configured in
~/.ssh/config?IdanAdar commentedon May 24, 2017
Yes.
I don't have a config folder in ~/.ssh
joshaber commentedon May 24, 2017
Could you paste in here the
.git/configfor a repository which fails and one that succeeds?IdanAdar commentedon May 24, 2017
Fails:
Succeeds:
joshaber commentedon May 24, 2017
Interesting! So the one that succeeds is using HTTPS while the one that fails is using SSH.
Off hand I'm not sure why SSH would fail 🤔 Unless, again, it has something to do with not having the shell environment.
IdanAdar commentedon May 25, 2017
BTW, I'm not sure why is there HTTPS, since when I clone it in GitHub Desktop beta, I use SSH...
joshaber commentedon May 26, 2017
Thanks for debugging this with us @IdanAdar! I'm gonna track this at #1795 since it seems to be about SSH and not Enterprise.