Scenario
Right so I've had this problem for a while, and to put things across quickly I'm trying to pull from a private repo but its saying that it doesn't exist. That leads me to believing that the stored git user details are that of a different account.
I have two git accounts, one for work related stuff and one for personal stuff.
I'm trying to pull from a private repo on the work account. But I'm not sure if my local git account is the work one or not because I've changed the git config user.email/user
etc globally to use the work email details but its not working. (originally it was the personal account)
The error message shows this
$ git pull
remote: Repository not found.
fatal: repository 'https://github.com/username/repo.git/' not found
I believe that if I add the personal account as a collaborator it will work. So I'm not sure why changing the git credentials doesn't allow me to push to that repo.
If any more information is needed let me know and I'll provide it / edit the question
My Question
How do I change which account is being used to perform my git actions. I want to be able to push / pull as the work account.
For reference again I've changed the git config
and git config --global
information to that of the work account.