git 提交代码到github错误处理

git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/hjyoung/php-redis-in-action.git/info/refs

修改配置

vim .git/config

将配置

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://github.com/hjyoung/php-redis-in-action.git

修改为

url = https://hjyoung@github.com/hjyoung/php-redis-in-action.git

 

再次push,输入密码,上传成功

posted @ 2016-11-10 23:14  茫海  阅读(146)  评论(0编辑  收藏  举报