Reputation: 105
I was changed user for github in Android studio and trying to pushing code in repository but its getting error.
Repository successfully creating and commit also but in pushing time getting error.
F:\....>git push -u origin master
remote: Permission to abc.in/abc.git denied to olduser.
fatal: unable to access 'https://..../abc.git/': The requested URL returned error: 403
I also tried new project, but still getting old user name denied access error.
Upvotes: 1
Views: 3152
Reputation: 319
Why don't you push using Android Studio?
Have you got write permission on remote for new user?
Did you changed user in repo too? I think that you still have old data. Check it in project directory
git config user.name
git config user.email
You can check this trick
edit .git/config file under your repo directory
find url=entry under section [remote "origin"]
change it from
to
url=ssh://[email protected]/your_user_name/repo_name.git.
Alternatively
git remote rm origin
git remote add origin https://github.com/your_user_name/repo.git
I have no more idea :)
Upvotes: 1