Skip to content

Support GitHub Desktop authentication #490

Closed

Description

@joe912

I have scm git installed and GitHub for Windows.

When I try to push I get prompted for username/password then get "Authentication failed on the git remote."

I am able to push from GitHub for Windows and command line using same credentials

Activity

  1. joaomoreno commented on Nov 23, 2015

    @joaomoreno
    Contributor

    What do you get when running git remote -v?

  2. joaomoreno commented on Nov 24, 2015

    @joaomoreno
    Contributor

    Yeah this is known. Hope you don't mind that I renamed this issue.

  3. changed the title [-]Authentication failed on the git remote.[/-] [+]Support GitHub for Windows authentication[/+] on Nov 24, 2015
  4. added
    feature-request
    on Nov 24, 2015
  5. changed the title [-]Support GitHub for Windows authentication[/-] [+]Support GitHub Desktop authentication[/+] on Nov 24, 2015
  6. joaomoreno commented on Nov 24, 2015

    @joaomoreno
    Contributor

    GitHub Desktop clones every repository using the https protocol and creates ~/.ssh/github_rsa and ~/.ssh/github_rsa.pub which it somehow uses for auth. git (or ssh) by default only looks for ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub when using authentication.

    We need to:

    • Find out how GitHub Desktop is able to use pubkey auth with the https protocol
    • Make VSCode use that github_rsa key when pulling/pushing from a GitHub repository.
  7. added
    help wanted
    on Nov 24, 2015
  8. joe912 commented on Nov 24, 2015

    @joe912
    Author

    ok - thanks for the update

  9. khrome83 commented on Dec 20, 2015

    @khrome83

    I can confirm I am having this same issue. I can use GitHub Desktop or CLI to push, but I can not sync with VS Code. I tried again with the December update and it was not supported still.

  10. khrome83 commented on Dec 20, 2015

    @khrome83

    I found the following Stackoverflow post that solved this issue.

    Basically, I ran git config --global credential.helper wincred from the command line, and restarted VC Code. When I reopened the project, I was now able to sync from VS Code.

    Do not know how this persists, and if it is only for that repo (--global makes me thing it will work elsewhere).

    Can we run this command as part of installation, if this solves the issue?

  11. mgs96 commented on Dec 24, 2015

    @mgs96

    Hello, I'm having the same issues, already followed the Stackoverflow post but it didn't work.

    I don't have any problem with editing the code in VSC and then using the CLI or the GitHub desktop to sync my repos but It would be great if this issue is solved, the last update didn't solved it.

    thanks

  12. 10 remaining items

  13. shaipetel commented on Mar 29, 2018

    @shaipetel

    this "git config --global credential.helper wincred" might work on windows, but I'm using a mac and Microsoft forces anyone on their repositories to activate 2 factor authentication.

    I cannot login from VSCode to my GitHub in order to sync with origin.

    Does anyone have a workaround for a Mac?

  14. shaipetel commented on Mar 29, 2018

    @shaipetel

    Since I don't want to Hijack this thread for Mac, I opened a separate issue for Mac OS:
    #46964

  15. shaipetel commented on Apr 9, 2018

    @shaipetel

    FYI found a workaround that seems to work on all OS systems, Mac and Windows:
    Visit your github developer settings and generate a personal access token.

    That token can be used as your password with your user name to login from VSCode and it seems to work normally from that point on without any special configuration.

  16. benjaminmoules commented on Jun 11, 2018

    @benjaminmoules

    It still doesn't work for me, I managed to login via the terminal, but using your username + password = token didn't workout very well with 2FA enabled

  17. kanmalkal commented on Jul 15, 2018

    @kanmalkal

    I noticed that even though there is a pop-up GUI window that takes the Git username and password, there is another Visual Code pop-up, under the top main menu bar in Visual Code, that asks for the Git username and password. After you enter your credentials there too, it works.

  18. Peakdrum commented on Sep 13, 2018

    @Peakdrum
  19. gazmull commented on Mar 15, 2019

    @gazmull

    I came across to this problem too just now after enabling 2FA on my account. I've regenerated the access token for VSC, and used it as the password. I was prompted twice but it worked. (OS: Windows 10)

  20. Pedroalbuquerque commented on May 3, 2020

    @Pedroalbuquerque

    FYI found a workaround that seems to work on all OS systems, Mac and Windows:
    Visit your github developer settings and generate a personal access token.

    That token can be used as your password with your user name to login from VSCode and it seems to work normally from that point on without any special configuration.

    Work for me too, great job !

  21. joaomoreno commented on May 6, 2020

    @joaomoreno
    Contributor

    Code now supports automatic GitHub authentication, when using HTTPS repositories, so there's no need to support GH Desktop. This is already working in Insiders and will come out soon in the next stable.

    https://twitter.com/joaomoreno/status/1255852214997995522

  22. locked and limited conversation to collaborators on Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestgithelp wanted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions