OSX: git: remote: user / repo permission denied to another user

I am trying to push a new repo on github and they are not letting me do it because git has cached meatworkcredentials.

$ git push -u origin master
remote: Permission to me/me.imtqy.com.git denied to meatwork.

After some digging, I thought maybe credential.helper was a problem, so I tried to remove its bit. git config still returns osxkeychain, although I deleted all the settings.

$ git config --system credential.helper 
$ git config --global credential.helper 
$ git config --local credential.helper 
$ git config credential.helper
osxkeychain
$ 

Also looked at git credential-osxkeychain, but it just freezes

$ git credential-osxkeychain get

In any case, back to the original problem, how can I specify or override or reset the default user used by push. I checked the settings user.nameand user.email, and they are configured for the correct user (not meatwork).

$ git config --local user.name
$ git config --global user.name
me
$ git config --system user.name
$ git config --local user.email
$ git config --global user.email
me@myhome.com
$ git config --system user.email

, git meatwork .

+4
3

, , https://git-scm.com/docs/gitcredentials

credential.username , , .

$ git config credential.username me

! , .

, .git/config [remote "origin"] url= username@ URL .

[remote "origin"]
  url = https://me@github.com/Me/me.imtqy.com.git
+2

, ( Mac):

  • Keychain Access.
  • github.com

, .

, - Mac Github, Mac , ...

-

: OSX Keychain | Github

+2

, Windows/10. , Credential Manager, .

Git Bash:

git push origin master

GitHub. / .

0

Source: https://habr.com/ru/post/1661565/


All Articles