Linux如何安装使用GitHub

admin Linux运维评论737字数 555阅读模式

Linux安装使用GitHub的步骤如下:

1. 在网站注册帐号,创建工程 test 进入工程,右下角会有一个项目仓库的地址。文章源自网吧系统维护-https://www.58pxe.com/7797.html

2.Linux下 安装github文章源自网吧系统维护-https://www.58pxe.com/7797.html

sudo apt -get install git git-core git-doc文章源自网吧系统维护-https://www.58pxe.com/7797.html

3. 创建rsa公钥文章源自网吧系统维护-https://www.58pxe.com/7797.html

ssh-keygen -t rsa -C “your_email@youremail.com”文章源自网吧系统维护-https://www.58pxe.com/7797.html

整个过程中有一个需要填密码文章源自网吧系统维护-https://www.58pxe.com/7797.html

然后后进入~/.ssh目录 找到公钥id_rsa.pub文章源自网吧系统维护-https://www.58pxe.com/7797.html

记事本打开复制文字文章源自网吧系统维护-https://www.58pxe.com/7797.html

进入github.com中的的设置,找到pubkey选项,填入公钥。文章源自网吧系统维护-https://www.58pxe.com/7797.html

命题随便填文章源自网吧系统维护-https://www.58pxe.com/7797.html

4. 设置账户信息文章源自网吧系统维护-https://www.58pxe.com/7797.html

git config –global user.name “lukeyan”文章源自网吧系统维护-https://www.58pxe.com/7797.html

git config –global user.email xxx@gmail.com文章源自网吧系统维护-https://www.58pxe.com/7797.html

5. 测试链接:文章源自网吧系统维护-https://www.58pxe.com/7797.html

如果有you’ve successfully authenticated, but GitHub does not provide shell access 。这就表示已成链接文章源自网吧系统维护-https://www.58pxe.com/7797.html

接下来上传:文章源自网吧系统维护-https://www.58pxe.com/7797.html

git init文章源自网吧系统维护-https://www.58pxe.com/7797.html

git add 。 #如果是。表示上传全部目录下的文件,可以是某个文件文章源自网吧系统维护-https://www.58pxe.com/7797.html

git commit -m ‘version 1.0’文章源自网吧系统维护-https://www.58pxe.com/7797.html

git remote add origin https://github.com/用户名/test.git文章源自网吧系统维护-https://www.58pxe.com/7797.html

git push origin master -f

版权声明:文章图片资源来源于网络,如有侵权,请留言删除!!!
广告也精彩
admin
  • 本文由 发表于 2021年9月29日 09:45:48
  • 转载请务必保留本文链接:https://www.58pxe.com/7797.html
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: