0

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
gradi3nt
  • 173
  • 10
  • 2
    You're actually using https authentication (note the `https` and not `ssh`). – tcooc Nov 01 '16 at 15:48
  • 1
    We will need clarification on what you want to do to fully answer this question. The correct answer for "how to not use "ssh" authentication" is to "not try to authenticate in the first place", which isn't helpful. How do you want to authenticate? – tcooc Nov 01 '16 at 15:51
  • @torek Thanks, that's my issue exactly! That question didn't come up even after I searched around quite a bit...I was looking for 'git push wrong account' but that usually came up with different questions. I flagged this question as a duplicate. – gradi3nt Nov 01 '16 at 19:54

0 Answers0