problem while i was pushing my code to github.com, someone has got main access to github from my PC,

后端 未结 1 1764
一向
一向 2020-12-11 10:32
$ git push -u origin master
remote: Permission to ravi5026/web-server.git denied to vnaresh007.
fatal: unable to access \'https://github.com/ravi5026/web-server.git/         


        
相关标签:
1条回答
  • 2020-12-11 11:21

    Check your git credential helper: this is what has cached the wrong credentials.

    git config credential.helper 
    

    On Mac, just open your keychain access->search for github.com related file->and edit credentials there.

    See "Updating credentials from the OSX Keychain"

    On Windows for example, that would be the Windows Credential Managers.
    Open the Windows Credential Store, and see if the first user is registered there: delete that entry, and you will be able to authenticate with the second user.

    (Here is an example for BitBucket; the same idea applies to GitHub)

    In command-line, as seen here:

    git credential reject
    protocol=https
    host=github.com
    <empty line here>
    

    and then to set the new username & password:

    git credential fill
    protocol=https
    host=github.com
    <empty line here>
    

    Type git help credential for detailed info.

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