第一次上传代码到github (Linux) - Go语言中文社区

第一次上传代码到github (Linux)


1    初始化
执行git init 


2   克隆

找到仓库地址,在github的具体项目上有

执行 git clone <地址>
并且把需要上传的文件拷贝过去

3  添加提交文件
git add *   即添加所有变动的

4 提交
git commit -m "描述"


*** Please tell me who you are.


Run
  
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"


to set your account's default identity.
Omit --global to set the identity only in this repository.


fatal: unable to auto-detect email address (got 'root@ubuntu.(none)')

  git config --global user.email "user@github.com"
 git config --global user.name  "usrname"


5 push到远端(服务器)
git push origin master

看到出错了,403
403错误,则请编辑 .git/config文件

把红线的地方修改为   
即在github前面加上 username@
 url = https://username@github.com/username/repository.git 

重新git push origin master


重新git push origin master    此时输入密码就ok了



版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/zhouzhenhe2008/article/details/70243890
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-05-07 23:04:00
  • 阅读 ( 1619 )
  • 分类:Linux

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢