代码改变世界

gitHub 提交代码

2023-01-31 21:14  话猫  阅读(693)  评论(0编辑  收藏  举报

1.首先在gitHub创建账号,然后创建一个仓库

 

2.push代码,提交代码时,URL填gitHub上的HTTPS的url

 

 

 

 点击ok,会出现让登陆gitHub,可以填token登陆,登陆从gitHub上的setting 中生成

 

 

3.git clone 远程gitHub上的代码

>> git clone URL

出现下列信息

Username for 'https://github.com': #1129734767@qq.com #(gitHub注册的邮箱)

Password for 'https://1129734767@qq.com@github.com': (有读写权限的token,从gitHub的setting中生成)

 

 ps:如果报下列错误 表明时生成的token没有读写权限,重新生成有读写权限的token即可

remote: Write access to repository not granted.

fatal: 无法访问 'https://github.com/chenhuichenhuichenhuichenhui/MaShiBingPractice.git/':The requested URL returned error: 403