Git Error: The requested URL returned error: 403 Forbidden while accessing

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: