After Solving git push origin master
, there is an error:
remote: Permission to `USer-A/project.git` denied to `User-B`.
fatal: unable to access `https://github.com/User-A/project.git/`: The requested URL returned error: 403
Environment: git version 2.24.3 (apple git-128)
The user.name I set in Git is the same as the name of GitHub
Solution:
-
- into your own project
cd [project_path]
-
-
- Edit URL in. Git/config
-
vim .git/config
You will see the following code block
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
name = user-A
email = [email protected]
[remote "origin"]
url = https://github.com/User-A/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[UNK]
url = https://github.com/User-A/project.git
[email protected]/User-A/project.git
then [UNK] git push origin master
,[UNK];
Password for 'https://[email protected]':
Just enter the password
Read More:
- Solve the error error fetching remote repo origin problem in Git on Jenkins
- git push error failed to push some refs to solution
- Git push “fatal: Authentication failed ”
- GitHub upload failed: git push error: failed to push some refs to exception handling
- [Git] git pull pull remote git push to remote git commit submit reject
- error: src refspec master does not match anyerror: failed to push some refs to
- Git solves pull origin error: the following untracked working tree files would be rewritten by merge
- How to Fix GIT Push Error
- Solving GitHub push error: the requested URL returned error:403 Forbidden while accessing
- error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx
- pathspec ‘master’ did not match any files known to git
- Error: pathspec ‘origin / xxx’ did not match any file (s) known to GIT
- Git failed to submit data error: failed to push some refs to’https://github.com/XXXXXXX/gif.git’
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- Git push you are not allowed to upload merges
- Error: SRC refspec master does not match any. error: failed to push some refs to
- Giterror: error cloning remote repo ‘origin’ hudson.plugins.git .GitException
- Git error: requested URL returned error: 403