Skip to content

GitHub Desktop doesn't support repositories from SSH servers with password #14676

Closed

Description

@ndpetwar

The problem

My git shell is working well fetching ,pushing ,pulling and doing all other required operations. I am also able to do all operations using eclipse->team in my repository but GitHub desktop showing authentication error.
these are my logs
2022-05-25T06:16:32.822Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 4 repositories took 2.4s of which 0.0s paused, total 2.4s
2022-05-25T06:23:06.835Z - error: [ui] git -c credential.helper= fetch --progress --prune origin exited with an unexpected code: 128.
stderr:
Permission denied, please try again.
Permission denied, please try again.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

(The error was parsed as 2: Authentication failed. Some common reasons include:

  • You are not logged in to your account: see File > Options.
  • You may need to log out and log back in to refresh your token.
  • You do not have permission to access this repository.
  • The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
  • If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
  • If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
  • If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.)

Release version

3.0.0

Operating system

windows 10

Steps to reproduce the behavior

No response

Log files

2022-05-24.desktop.production.log

Screenshots

No response

Additional context

No response

Activity

  1. sergiou87 commented on May 25, 2022

    @sergiou87
    Member

    @ndpetwar I assume this is not a repository hosted on GitHub and it was cloned with SSH, is that right? If so, have you added your SSH key to ssh-agent? Take a look at this docs: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent

  2. added
    more-info-needed
    on May 25, 2022
  3. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    yes sir i have already added ssh key to ssh agent and thats why able to connect to the server repo via git bash but not with github desktop @sergiou87

  4. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    @sergiou87 take a look at the command line results
    D:\GSTM_PROJ_NEW\utility-project>git config --list
    http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
    http.sslbackend=openssl
    diff.astextplain.textconv=astextplain
    filter.lfs.clean=git-lfs clean -- %f
    filter.lfs.smudge=git-lfs smudge -- %f
    filter.lfs.process=git-lfs filter-process
    filter.lfs.required=true
    credential.helper=manager-core
    core.autocrlf=true
    core.fscache=true
    core.symlinks=false
    pull.rebase=false
    credential.https://dev.azure.com.usehttppath=true
    init.defaultbranch=master
    filter.lfs.clean=git-lfs clean -- %f
    filter.lfs.smudge=git-lfs smudge -- %f
    filter.lfs.process=git-lfs filter-process
    filter.lfs.required=true
    user.name=Nisha Duhan
    user.email=_______(edited)
    gui.recentrepo=D:/
    init.defaultbranch=main
    credential.helper=wincred
    core.repositoryformatversion=0
    core.filemode=false
    core.bare=false
    core.logallrefupdates=true
    core.symlinks=false
    core.ignorecase=true
    submodule.active=.
    remote.origin.url=git@edited(serverip):/home/GSTM_DATA/utility-project.git
    remote.origin.fetch=+refs/heads/:refs/remotes/origin/
    branch.master.remote=origin
    branch.master.merge=refs/heads/master
    //some more branches information
    branch.utility_test.rebase=false
    branch.demo_branch.remote=origin
    branch.demo_branch.merge=refs/heads/demo_branch
    branch.demo_branch.rebase=false

  5. sergiou87 commented on May 25, 2022

    @sergiou87
    Member

    Interesting, are you using ssh agent from PuTTY? It's recommended to use Git for Windows instead.

  6. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    no that was windows cmd and not putty (and as project editor we use eclipse and to communicate and get changes from all colleagues we use github desktop) but github desktop suddenly stop working after 19 may altogether and we are getting authentication error on all of our team systems github dektop .

  7. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    @sergiou87 can you please resolve the authentication problem ,we are working to resolve it since last week and tried everything but cant get out of it.

  8. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    we are just using cmd and git bash to check whether we are able to communicate to repo using these or not. Now as We can perform all the git operation on git bash,cmd and eclipse team so we figured out that this authentication problem is only with github desktop.

  9. sergiou87 commented on May 25, 2022

    @sergiou87
    Member

    We haven't made any changes related to SSH support in a long time, so I'm not entirely sure if this is a GitHub Desktop issue 🤔

    The only change I can think of is when we upgraded Git to v2.35.3 in GitHub Desktop 2.9.15. I can suggest you try an older version of the app BUT ⚠️ make sure you back up the apps settings (located in C:\Users<YourUserName>\AppData\Roaming\GitHub Desktop) because those might be wiped after downgrading the app ⚠️

    If you're interested in trying this, you can install this version which is prior to the mentioned Git change: https://centralreleases.blob.core.windows.net/github-desktop/releases/2.9.12-c058bcc5/GitHubDesktopSetup-x64.exe

    Please, if you try it, let me know if that version works

  10. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    ok i will let you know

  11. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    @sergiou87 older version also not works for me the same error continues.
    error: [ui] git -c credential.helper= fetch --progress --prune origin exited with an unexpected code: 128.
    stderr:
    Permission denied, please try again.
    Permission denied, please try again.
    git@-------serverip-----: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

  12. sergiou87 commented on May 25, 2022

    @sergiou87
    Member

    That version you just tried was released in March 23rd 2022, so I don't think anything changed on GitHub Desktop that caused this problem. Is it possible something changed on your end (either on your machine's setup, network setup, repo's server setup…) on May 19?

  13. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    We add a password on our git on our server but github desktop not asking for any password.
    i.e ssh git@serverip cmd ask for password now
    Can you tell me some commands that i can run and we can trouble shoot where the error is?

  14. sergiou87 commented on May 25, 2022

    @sergiou87
    Member

    Oh, so you added a password on your server, not on your SSH key? Right now GitHub Desktop supports SSH key with passphrases, but if your server is what requests the password… that's not supported.

    Could you paste here the terminal output when git asks you for this password when you use git pull/push/whatever from the command line?

    For example, I'd like to see something like this:

    $ git pull
    Enter password for git@serverip:
    Pulling objects…
    ...
    

    Knowing the prompt text displayed to you might help me understand the problem better. Thanks!

  15. ndpetwar commented on May 25, 2022

    @ndpetwar
    Author

    D:\GSTM_PROJ_NEW\utility-project>git pull
    git@serverip's password:
    Already up to date.

    D:\GSTM_PROJ_NEW\utility-project>git fetch
    git@serverip's password:

    D:\GSTM_PROJ_NEW\utility-project>git branch
    Business-Validation-Pradipta
    Nisha/Sourcs-code-error-1
    PRADIPTA-SQL-NAAT
    Release_error_removal1
    copy_of_my_ear
    demo_branch
    dummy_branch_as_master
    feature_error_removal
    heena-errorcode-3
    master
    master-backup
    nitya-sub-branch
    utility_live

    • utility_test

    D:\GSTM_PROJ_NEW\utility-project>

  16. 22 remaining items

  17. hotmeteor commented on Jun 29, 2022

    @hotmeteor

    @sergiou87 Thanks. I guess I'm not sure what to do with it? I've never authenticated with codeserver.dev before this change. Or maybe I'm misunderstanding?

  18. sergiou87 commented on Jun 29, 2022

    @sergiou87
    Member

    Weird, if that dialog pops up it means git/ssh is trying to access that server under the hood and needs your password for that. Are you actively using the repository that corresponds to that SSH user/server?

  19. hotmeteor commented on Jun 30, 2022

    @hotmeteor

    I'm actively using the repo but I don't know what the drush.in domain is for. A quick search pulled up stuff around Drupal, but we're not using Drupal 🤷

  20. sergiou87 commented on Jun 30, 2022

    @sergiou87
    Member

    Could you run git remote -v in your repository and see if there is anything even remotely similar to that codeserver.dev.…?

  21. hotmeteor commented on Jun 30, 2022

    @hotmeteor
  22. sergiou87 commented on Jun 30, 2022

    @sergiou87
    Member

    It could be another repo from your list that GitHub Desktop is trying to fetch in background. Do any of your repositories come from that server? 🤔

  23. cartoonsub commented on Jul 5, 2022

    @cartoonsub

    How do I turn off the constantly appearing window? It prevents me from working
    2022-07-05_11-38-03

  24. Orokyunless commented on Jul 5, 2022

    @Orokyunless

    Leave me alone please.

  25. hotmeteor commented on Jul 5, 2022

    @hotmeteor

    @cartoonsub Yep, that's my issue as well.

  26. sergiou87 commented on Jul 11, 2022

    @sergiou87
    Member

    @hotmeteor It could be another repo from your list that GitHub Desktop is trying to fetch in background. Do any of your repositories come from that server? 🤔

    @cartoonsub is that prompt for the active repository? Or is it from a different repository in your list?

  27. hotmeteor commented on Jul 12, 2022

    @hotmeteor

    @hotmeteor I have searched my entire computer for drush.in and there's nothing found, of course it could be some weird remote referenced in another repo. Just weird that it started to show up.

  28. sergiou87 commented on Jul 12, 2022

    @sergiou87
    Member

    @hotmeteor it's just a new feature for repositories that need it. If GitHub Desktop needs a password to access some repo's remote, it will prompt you for it.

  29. cartoonsub commented on Jul 18, 2022

    @cartoonsub

    I use a third-party repository for one project that is not linked to github.

  30. sergiou87 commented on Jul 18, 2022

    @sergiou87
    Member

    @cartoonsub if that repository is added to the list of repositories in Desktop, or if it's a submodule of the repo you're using, I guess git will try to fetch it and for that it will need your SSH credentials. Does that make sense?

  31. ndpetwar commented on Mar 9, 2023

    @ndpetwar
    Author

    @sergiou87 today i changed my repository password in the server and as earlier in the GitHub desktop i choose remember password option so now it again showing error of authentication and the password entering prompt screen is not appearing .Kindly help once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions