git 同步到git远程仓库错误解决办法

git push 后出现以下错误:
或没有权限
The requested URL returned error: 403Forbidden while accessing

答案:私有项目,没有权限,输入用户名密码,或者远程地址采用这种类型:

vi .git/config
# 将[remote "origin"]  
    url = https://github.com/用户名/仓库名.git
修改为:
[remote "origin"]
    url = https://用户名:密码@github.com/用户名/仓库名.git

你可能感兴趣的:(git 同步到git远程仓库错误解决办法)