When committing code to git, this error appears “error: The requested URL returned error: 403 Forbidden while accessing https”
Workaround.
Edit the config file in the .git directory.
vim .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote “origin”]url = https://[email protected]/enzhouguo/video_web.git
//old url = https://github.com/enzhouguo/video_web.git//new url = https://[email protected]/enzhouguo/video_web.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch “master”]
remote = origin
merge = refs/heads/master
Similar Posts:
- [How to Solve] fatal: No remote repository specified. Please, specify either a URL…
- git commit–fatal: unable to auto-detect email address
- Git error: requested URL returned error: 403
- Git Unable to switch remote branches error: pathspec ‘origin/XXXX’ did not match any file(s) known to git
- Git clone download code prompts that the file pointed to by head does not exist
- Conflict resolution after git error non fast forward
- Git pull does not specify an error message for the branch
- A rejected – non fast forward error occurred in eclipse push
- A rejected – non fast forward error occurred in eclipse push