I want to push to a personal github repository from a shared laboratory computer. It seems like when git-scm was installed it was somehow linked with a Github account. When I run git push
from this shared computer instead of being prompted for a github username and password I get:
$ cd username/github/re****
$ git push origin master
remote: Permission to ju****/re****.git denied to rz****.
fatal: unable to access 'https://github.com/ju****/re****.git/': The
requested URL returned error: 403
I can't figure out why the rz****
credentials are involve in this at all. In my config user.email matches the 'ju****' account, not the 'rz****' account, and my remote is using https://...
not git@github.com/...
. This is not the behavior I am used to as a user of git and github on OSX or Linux. My guess is that git is trying to authenticate with a key that belongs to the rz**** account, but I can't figure out how to turn off this automatic behavior.
.git/config contents:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/ju****/re****.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[user]
email = ju****@gmail.com