Sourcetree remote: Invalid username or password

前端 未结 15 1253
失恋的感觉
失恋的感觉 2021-01-30 00:16

Im trying to push to github with sourcetree but get the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin

相关标签:
15条回答
  • 2021-01-30 00:31

    I found the answer here, it is a known bug for version 2.1.8+

    The following steps fixed it for me:

    Tools > Options > Git > Update Embedded Git
    

    Also pushing with the command line works.

    EDIT

    Also adding @Latisha's answer:

    1. Do the above.
    2. Close Sourcetree
    3. Delete AppData\Local\Atlassian\SourceTree\passwd 
    4. Restart SourceTree
    
    0 讨论(0)
  • 2021-01-30 00:31

    I had the same problem and I fixed it by installing the latest version of git for windows

    0 讨论(0)
  • 2021-01-30 00:32

    On Windows try:

    1. Tools> Options> Authentication - delete from Git Saved Password your problem repo data (ex login@repo.com)
    2. Select tab with problem repo.
    3. Open terminal and make some git command (ex git pull origin) and you will be asked login and password. Input correct login and password. Login and password will be updated and all works again.
    0 讨论(0)
  • 2021-01-30 00:34

    I typed the wrong username (email address) when pushing and what worked for me was:

    Open KeyChain Access search for SourcTree delete the 'login' item

    Then go to Sourcetree > Preferences > Advanced and delete the default usernames that includes the wrong email address.

    0 讨论(0)
  • 2021-01-30 00:36

    I struggled with this a lot, what solved it for me on my Mac is:

    • Open finder, click Cmd + Shift + g
    • enter ~/Library/
    • Go to Application Support/SourceTree folder
    • delete userName@STAuth-bitbucket.org
    • Open KeyChain Access
    • search for sourctree
    • delete the 'login' item
    • clone your source from bitbucket
    • KeyChain will ask for you bitbucket pass
    0 讨论(0)
  • 2021-01-30 00:41

    For SourceTree 2.7.6 for macOS using embedded git I followed all the suggested answers but still had the same problem.

    The solution for me was to turn off two factor authentication.

    Obviously not ideal, but sometimes you just need to get your work done.

    0 讨论(0)
提交回复
热议问题