推送代码
git push origin master
报错
remote: You are not allowed to push code to this project.
fatal: unable to access 'http://xxx:8086/ennt/wr.git/': The requested URL returned error: 403
上面报错意思很明显:在这个工程中你没有推送代码的权限
所以解决思路:
1、在git工程项目中检查你是否有权限
没有权限的话,让管理员给你添加权限;但是我是有权限的,依然报这个错误;
2、工程项目中有权限,我们检查git的账号密码邮箱
检查配置
git config --list
检查账号密码邮箱是否正确,是否是你的账号密码邮箱
可通过以下方式更改:
查看该项目账号密码邮箱
git config user.name
git config user.password
git config user.email
查看全局账号密码邮箱
git config --global user.name
git config --global user.password
git config --global user.email
更改当前文件夹下:
git config user.name "账号"
git config user.password "密码"
git config user.email "邮箱"
更改全局账号密码邮箱:
git config --global user.name "账号"
git config --global user.password "密码"
git config --global user.email "邮箱"
如果账号密码邮箱正确,或者修改账号密码邮箱后依然报错403:你没有权限;不要着急,我们继续...
3、有权限且账号密码邮箱正确,我们管理编辑windows凭据
1、打开控制面板

2、点击用户账户

3、管理windows凭据
4、查看windows凭据中git的账号密码是否正确
5、 点击编辑,修改凭据的账号密码

6、保存
当尝试用gitpush到远程仓库时遇到Youarenotallowedtopushcode的403错误,即使有权限,可能是Windows凭据缓存的账号密码不正确。检查和更新git配置的用户名和密码,以及管理Windows凭据存储的登录信息,能解决此问题。
2786





