首页 > 窍门 > 科技数码

Linux如何安装使用GitHub

来源: 更新时间:2023-07-13 00:20:13
The Beginning

  Linux安装使用GitHub的步骤

Linux如何安装使用GitHub

  1. 在网站注册帐号,创建工程 test 进入工程,右下角会有一个项目仓库的地址。

  2.Linux下 安装github

  sudo apt -get install git git-core git-doc

  3. 创建rsa公钥

  ssh-keygen -t rsa -C “your_email@youremail.com”

  整个过程中有一个需要填密码

  然后后进入~/.ssh目录 找到公钥id_rsa.pub

  记事本打开复制文字

  进入github.com中的的设置,找到pubkey选项,填入公钥。

  命题随便填

  4. 设置账户信息

  git config --global user.name “lukeyan”

  git config --global user.email xxx@gmail.com

  5. 测试链接:

  如果有you’ve successfully authenticated, but GitHub does not provide shell access 。这就表示已成链接

  接下来上传:

  git init

  git add 。 #如果是。表示上传全部目录下的文件,可以是某个文件

  git commit -m ‘version 1.0’

  git remote add origin https://github.com/用户名/test.git

  git push origin master -f

THE END

TAG:公钥  上传  链接  

猜你喜欢

相关文章