Skip to content

Unable to use GitHub Enterprise #1738

Closed

Description

@IdanAdar

Description

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

  1. Install GitHub Desktop beta and launch the app
  2. 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"

  1. Click on "Sign in using your browser"
  2. A new browser tab opens and a pop-up appears, providing me the option to "Open using the GitHub Desktop app"
  3. The app screen then changes with my Name and Email fields filled
  4. Click on "Continue" and "Finish"
  5. Select to add a repository from disk (this repository was previously cloned using Tower)
  6. The repository gets imported, however I see the following in the Developer Tools:

screen shot 2017-05-24 at 15 21 11

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.

Reproduces how often: Always

Activity

  1. shiftkey commented on May 24, 2017

    @shiftkey
    Member

    @IdanAdar which version of GitHub Enterprise are you trying to connect to?

  2. added
    bug
    investigation-needed
    on May 24, 2017
  3. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

    GHE 2.9.

  4. niik commented on May 24, 2017

    @niik
    Member

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

    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.

  5. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author
    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.

  6. niik commented on May 24, 2017

    @niik
    Member

    This repository was cloned using SSH in Tower. In Tower, these actions work.

    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?

  7. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

    Are you able to fetch using GitHub Desktop now that you've explicitly accepted the new key?

    No.

    Observation:

    1. The same (Tower-cloned) repository, when locally imported into GitHub Desktop beta - fails.
    2. 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?

  8. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

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

  9. tierninho commented on May 24, 2017

    @tierninho
    Contributor
  10. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

    Maybe. But I don't understand in what way. :)

  11. joshaber commented on May 24, 2017

    @joshaber
    Contributor

    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.

    The same repository, if SSH cloned in GitHub Desktop beta, works.

    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?

  12. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

    To be clear, you're using File > Clone Repository… in GitHub Desktop and entering the SSH URL to clone it?

    Yes.

    Do you know if you have anything special configured in ~/.ssh/config?

    I don't have a config folder in ~/.ssh

  13. joshaber commented on May 24, 2017

    @joshaber
    Contributor

    Could you paste in here the .git/config for a repository which fails and one that succeeds?

  14. IdanAdar commented on May 24, 2017

    @IdanAdar
    Author

    Fails:

    [core]
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
            ignorecase = true
            precomposeunicode = true
    [remote "origin"]
            url = [email protected]:****/****.git
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master
    [branch "develop"]
            remote = origin
            merge = refs/heads/develop
    [mergetool "tower"]
            cmd = \"/Applications/Tower.app/Contents/Resources/kaleidoscope.sh\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
            trustExitCode = true
    

    Succeeds:

    [core]
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
            ignorecase = true
            precomposeunicode = true
    [remote "origin"]
            url = https://github.ibm.com/****/****.git
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "develop"]
            remote = origin
            merge = refs/heads/develop
    
  15. joshaber commented on May 24, 2017

    @joshaber
    Contributor

    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.

  16. IdanAdar commented on May 25, 2017

    @IdanAdar
    Author

    BTW, I'm not sure why is there HTTPS, since when I clone it in GitHub Desktop beta, I use SSH...

  17. joshaber commented on May 26, 2017

    @joshaber
    Contributor

    Thanks for debugging this with us @IdanAdar! I'm gonna track this at #1795 since it seems to be about SSH and not Enterprise.

  18. locked as resolved and limited conversation to collaborators on Jul 22, 2018
  19. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginvestigation-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions