Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5944

Branch still pushing from old account

$
0
0

I needed to switch github accounts to push something to a company github account. I tried to change to my new username but constantly get rejected.

    remote: Permission to Company/project.git denied to oldUserName.    fatal: unable to access 'https://company.com/Company/project.git/': The requested URL returned error: 403

Here is all the troubleshooting I've done:

  1. gh auth logout/gh auth login. When I check the status, I'm apparently logged into the correct account but still can't push from it.
  2. git config --global user.email "newemail@company.com"
  3. Setting up an SSH key for my new User Name
  4. git remote set-url https://github.com/userUserName/project. The url was gotten from git remote -v and the following error was gotten:
usage: git remote set-url [--push] <name> <newurl> [<oldurl>]   or: git remote set-url --add <name> <newurl>   or: git remote set-url --delete <name> <url>    --[no-]push           manipulate push URLs    --[no-]add            add URL    --[no-]delete         delete URLs    enter code here

I've read through plenty of stackoverflow questions and github tutorials but they all seem to be failing. I really appreciate any advice or help.


Viewing all articles
Browse latest Browse all 5944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>