Git管理远程仓库
一、图解使用远程仓库
二、Git克隆操作
将远程仓库(github对应的项目)复制到本地
命令:git clone 仓库地址
仓库地址的由来:
三、将本地仓库同步到git远程仓库中
命令:git push
ps:如果无法同步,可能是因为没有权限
The requested URL returned error: 403Forbidden while accessing
Java Code
1 2 3 4 5 6 7 8 9 10 |
答案:私有项目,没有权限,输入用户名密码,或者远程地址采用这种类型: vi .git/config # 将 [remote "origin"] url = https://github.com/用户名/仓库名.git 修改为: [remote "origin"] url = https://用户名:密码@github.com/用户名/仓库名.git |