andrelange91
andrelange91

Reputation: 1148

TortoiseGit - push error on other user

I have a problem when I try to push to a repository I have made.

I created a repository, and now I'm trying to commit and push files to that repository.

But I get an error that says

"Remote: Permission to {link} denied to {notmyname}
fatal: unable to access {link}: the requested URL returned error: 403
Git did not exit cleanly (exit code 128)"

When I go into settings, under "info" my name and email are correct.

But in the error code it displays a name which once had been used, but not anymore.

How do I change this? How do I fix the error?

I have not been able to find a solution using Google so far.

Upvotes: 2

Views: 2286

Answers (2)

MrTux
MrTux

Reputation: 33993

The user information under TortoiseGit -> Git "Info" is only used as meta data for commits and not for authentication.

In your case it seems as if old credentials were saved which are used right now.

If it's a http/https URL and you use a credential store (what I assume), you can see here which credentials are used and reset them.

Generally it depends on which protocol you use, http/https or ssh. See https://stackoverflow.com/a/41292048/3906760.

Upvotes: 2

Sanjit Kumar Mishra
Sanjit Kumar Mishra

Reputation: 1209

Try if this works: Change your repo config on your PC to ssh way:

  1. Edit .git/config file under your repo directory.

  2. Find url=entry under section [remote "origin"]

  3. change it from url=https://user@gitUrlLocation/yourgitUrl.git to url=ssh://user@gitUrlLocation/yourgitUrl.git. that is, change all the texts before @ symbol to ssh://git

  4. Save config file and quit. now you could use git push origin master to sync your repo on GitHub

Upvotes: 1

Related Questions