feiquan

git登陆

 

1. 执行登陆用户名和密码命令

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

 

2. 生产密钥对

$ ssh-keygen -t rsa -C "your_email@youremail.com"

3. 配置公钥私钥

  1. 登录到github:

 

 然后将 .ssh/id_rsa.pub中的内容复制到下图中的key中,并点击Add  SSH key

 

4. 检测密钥对是否可以使用:

$ ssh -T git@github.com

5.  使用命令 git remote -v 查看你当前的 remote url

git remote -v

6. 连接到远程仓库

登录github。点击首页的start a project,会出来下图所示:

 

 

 填写对应的信息,并点击最后一个按钮后,会得到下图中的一个链接:

复制 ssh后面的链接,在git命令行窗口执行:

git remote add origin https://github.com/OliveKong/poster.git 

 然后就可以提交代码了

分类:

技术点:

相关文章:

  • 2021-10-29
  • 2022-01-15
  • 2021-11-23
  • 2021-12-18
  • 2018-11-09
猜你喜欢
  • 2021-11-23
  • 2021-12-03
  • 2021-12-24
  • 2021-08-01
  • 2021-06-20
  • 2022-01-12
  • 2021-12-15
相关资源
相似解决方案