Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
800 views
in Technique[技术] by (71.8m points)

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

$ 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/': The requested URL returned error: 403

where can I delete vnaresh007 and put my own access. My credentials are set properly.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

https://help.github.com/assets/images/help/setup/keychain-access.png

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)

https://kwilson.io/blog/wp-content/uploads/2015/01/4-store.png

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...