Skip to content

Authentication Failed #6538

Closed
Closed

Description

@dkowalec

Description

Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open preferences and verify that you're signed in with an account that has permission to access this repository.

Version

  • GitHub Desktop: 1.5.1
  • Operating system: macOS High Sierra 10.13.6

Steps to Reproduce

  1. Add repository to GitHub Desktop by local patch
  2. Select Fetch origin

Expected Behavior

Fetch repo, using same credentials retrieving anothe private repo which works fine.

Actual Behavior

Getting an authentication failed error which is stated in the description. Is this possible due to the SSH key having a passphrase? Weird as one private repo works fine but newly created repo does not. I tested through command line and no error occurs.

Additional Information

Click on fetch
image
Error Prompt
image

Logs

Activity

  1. shiftkey commented on Jan 5, 2019

    @shiftkey
    Member

    @dkowalec thanks for the report!

    Is this possible due to the SSH key having a passphrase?

    Perhaps - is this an SSH remote or a HTTPS remote? The .git/config for the repository should contain this information.

    Also, could you attach the full log files? The Help | Show Logs in Finder menu items should open the logs folder, and inside those are the log files generated by day. This will provide some more information to help troubleshoot.

  2. added
    more-info-needed
    on Jan 5, 2019
  3. ignis-sec commented on Jan 6, 2019

    @ignis-sec

    Im having the same issue so i would like to add it here.

    Version

    GitHub Desktop: 1.5.1
    Operating system: Windows 10 10.0.17134

    Problem

    Can't fetch/pull/push from ssh repositories with passphrases.

    Ssh key is added to ssh-agent, and using git commands from cmd will not ask for passphrase, and will work correctly.
    Using git GUI will work as intended, popping up a passhprase dialog.
    However, Github Desktop will still fail at authentication when fetching/pulling/pushing the same repository.

    Adding another ssh key for same repository without passphrase works.

    Sidenotes

    Private keys are under username/.ssh
    i tried:

    • Just using ssh-add file
    • using ssh-agent -s then using ssh-add file
    • using start-ssh-agent
  4. billygriffin commented on Jan 7, 2019

    @billygriffin
    Contributor

    @desktop/support Any thoughts here?

  5. added
    support
    on Jan 7, 2019
  6. dkowalec commented on Jan 8, 2019

    @dkowalec
    Author

    @dkowalec thanks for the report!

    Is this possible due to the SSH key having a passphrase?

    Perhaps - is this an SSH remote or a HTTPS remote? The .git/config for the repository should contain this information.

    Also, could you attach the full log files? The Help | Show Logs in Finder menu items should open the logs folder, and inside those are the log files generated by day. This will provide some more information to help troubleshoot.

    @shiftkey
    Yes, the git config setup with the repo using https works but the git repo setup to use ssh w/ rsa w/ passphrase does not work using GitHub Desktop. How can we fix this as we require a passphrase to be HIPPA compliant when connecting? Otherwise, I will need to continue to use SourceTree as that works just fine.

    HTTPS (works)
    [remote "origin"] url = https://github.com/organization-name/repo-name.git fetch = +refs/heads/*:refs/remotes/origin/*

    SSH (does not work)
    [remote "origin"] url = [email protected]:organization-name/repo-name.git fetch = +refs/heads/*:refs/remotes/origin/*

  7. shiftkey commented on Jan 8, 2019

    @shiftkey
    Member

    This feels very familiar to #5641, where someone wanted to use an external SSH setup but GitHub Desktop would favour it's own internal version. They could change this behaviour via the core.sshCommand config value: #5641 (comment)

    Otherwise, I will need to continue to use SourceTree as that works just fine.

    I gather you've configured SourceTree to use a system-installed Git, which might explain why it works fine with your SSH setup.

  8. yalanzhi commented on Jan 8, 2019

    @yalanzhi

    Im having the same issue so i would like to add it here.

    Version

    GitHub Desktop: 1.5.1
    Operating system: macOS Mojave 10.14.2

    Problem

    Can't fetch private repos from my account. Always pop-ups an additional authentication window, but nothing happens.

    Sidenotes

    Public repos fetched without any problems. Changing repo from private to public also kinda solved this problem. Accessing any repos at website without any troubles.

    Logs

    2019-01-08T15:33:05.163Z - info: [ui] storing generic credentials for 'github.com' and '@gmail.com'
    2019-01-08T15:33:05.265Z - info: [ui] [AppStore.getAccountForRemoteURL] account found for remote: https://github.com/***/***.git - *** (has token)
    2019-01-08T15:33:07.369Z - info: [ui] Executing clone: git -c credential.helper= clone --recursive --progress -- https://github.com/***/***.git /Users/
    // (took 2.101s)
    2019-01-08T15:33:07.369Z - error: [ui] git -c credential.helper= clone --recursive --progress -- https://github.com/***/***.git /Users/***/***/*** exited with an unexpected code: 128.
    Cloning into '/Users///***'...
    remote: Your account is disabled. Please see https://github.com/account/billing
    fatal: unable to access 'https://github.com/***/***.git/': The requested URL returned error: 403

    (The error was parsed as 3: Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open preferences and verify that you're signed in with an account that has permission to access this repository.)

  9. shiftkey commented on Jan 8, 2019

    @shiftkey
    Member

    @yalanzhi

    remote: Your account is disabled. Please see https://github.com/account/billing

  10. steveward commented on Jan 8, 2019

    @steveward
    Contributor

    @yalanzhi I've gone ahead and unlocked your account. Let me know if you run into any issues.

  11. dkowalec commented on Jan 14, 2019

    @dkowalec
    Author

    So the issue seems to be using SSH w/ passphrases and private repositories for my case.
    @steveward

  12. dkowalec commented on Jan 14, 2019

    @dkowalec
    Author

    @dkowalec thanks for the report!

    Is this possible due to the SSH key having a passphrase?

    Perhaps - is this an SSH remote or a HTTPS remote? The .git/config for the repository should contain this information.

    Also, could you attach the full log files? The Help | Show Logs in Finder menu items should open the logs folder, and inside those are the log files generated by day. This will provide some more information to help troubleshoot.

    I think the additional information here is sufficient enough at this point don't you think?
    @shiftkey

  13. shiftkey commented on Jan 14, 2019

    @shiftkey
    Member

    @dkowalec please see my earlier comment #6538 (comment)

  14. dkowalec commented on Jan 14, 2019

    @dkowalec
    Author

    @dkowalec please see my earlier comment #6538 (comment)

    @shiftkey , so this is a workaround until your team can fix the desktop client? I never confused SourceTree it works from install. I just point to the repo and that's it.

    Can we assume the workaround listed for Windows also applies to Mac client version of GitHub Desktop?

    I am actually running GIT version 2.17.1 but mainly using a clone mirror and using Acquia DevDesktop2 to emulate

  15. shiftkey commented on Jan 14, 2019

    @shiftkey
    Member

    I never confused SourceTree it works from install. I just point to the repo and that's it.

    @dkowalec do you have Sourcetree's Git pointing to it's embedded Git or to a system Git? If it's using the system Git, that would explain why it's working the same as the Git command line (it knows how to find the running ssh-agent process):

    Can we assume the workaround listed for Windows also applies to Mac client version of GitHub Desktop?

    I believe core.sshCommand works wherever Git and SSH work.

  16. dkowalec commented on Jan 14, 2019

    @dkowalec
    Author

    I can try the workaround but it seems SourceTree is using the Embedded Git same as yours but 2.15.1 and yours is 2.18.0
    @shiftkey
    image

  17. shiftkey commented on Jan 14, 2019

    @shiftkey
    Member

    @dkowalec interesting. Anything SSH-specific in your ~/.gitconfig that we might not be aware of?

  18. dkowalec commented on Jan 14, 2019

    @dkowalec
    Author

    @dkowalec interesting. Anything SSH-specific in your ~/.gitconfig that we might not be aware of?

    Doubtful. It is pretty basic, standard install; haven't messed with it. Please let me know any other data you need I am more than happy to provide
    @shiftkey

    cat ~/.gitconfig

    [user]
    	name = Daniel Kowalec
    	email = [email protected]
    [core]
    	excludesfile = /Users/dkowalec/.gitignore_global
    	autocrlf = input
    [difftool "sourcetree"]
    	cmd = opendiff \"$LOCAL\" \"$REMOTE\"
    	path = 
    [mergetool "sourcetree"]
    	cmd = /Users/dkowalec/Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    	trustExitCode = true
    [commit]
    	template = /Users/dkowalec/.stCommitMsg
    [filter "lfs"]
    	clean = git-lfs clean -- %f
    	smudge = git-lfs smudge -- %f
    	process = git-lfs filter-process
    	required = true
    
  19. sorashi commented on Jan 21, 2019

    @sorashi

    I'm having the same issue. GitHub Desktop version 1.6.0, Windows 10.
    When the repo's remote is SSH, GitHub Desktop shows the authentication failed message on fetch/pull/push.
    I tried setting up ssh-agent and ssh-adding my keys, but the error persists. (I do usually type my SSH password every time I use my SSH key(s) in Git Bash, because I'm quite paranoid.)

    Changing the remote to HTTPS – either using the GH Desktop UI or using the git remote set-url origin command – fixes the issue, as GH Desktop can use the GitHub credentials to connect.

  20. steveward commented on Jan 23, 2019

    @steveward
    Contributor

    @sorashi it sounds like you may need to use the workaround that @shiftkey shared in #5641 (comment) to use the system Git for SSH. Try following those steps to see if it resolves this issue.

    @dkowalec just to clarify -- have you tried the SSH workaround of using the system Git for SSH? You mentioned in #6538 (comment) that you were going to try it -- let us know if that got things working for you in GitHub Desktop.

  21. sorashi commented on Jan 24, 2019

    @sorashi

    @sorashi it sounds like you may need to use the workaround that @shiftkey shared in #5641 (comment) to use the system Git for SSH. Try following those steps to see if it resolves this issue.

    @steveward, thank you very much, the solution works.

  22. tierninho commented on Feb 12, 2019

    @tierninho
    Contributor

    This issue appears to be resolved. Happy to reopen if there are any other concerns.

  23. AlexSchaeferBs commented on Feb 18, 2020

    @AlexSchaeferBs

    Unfortunately i have the exact same behavior with my MAC version of GitHub Desktop 2.3.1. The workaround only describes solutions for WIN PCs.

    I tried both ways: "Publishing" a repository from the GitHub Desktop App runs an authentification error as well as Trying to "Set Up in Desktop" from the WebApp.

    BTW: Billing says, my account is fine.

  24. tierninho commented on Feb 18, 2020

    @tierninho
    Contributor

    @AlexSchaeferBs Please fill a new issue and if possible, include your logs. Thank you!

  25. AlexSchaeferBs commented on Feb 19, 2020

    @AlexSchaeferBs

    Unfortunately i have the exact same behavior with my MAC version of GitHub Desktop 2.3.1. The workaround only describes solutions for WIN PCs.

    I tried both ways: "Publishing" a repository from the GitHub Desktop App runs an authentification error as well as Trying to "Set Up in Desktop" from the WebApp.

    BTW: Billing says, my account is fine.

    Just solved: Might have been caused by me changing my GitHub user name before. I used GitHub desktop with a previous user name. After logging out, deinstalling, reinstalling an logging in. The issue was fixed.

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

    more-info-neededsupport

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions