1、安装Git Bash

https://git-scm.com/downloads

 

2、鼠标右键git bash here

其他:Git生成SSH、Git生成本地库、下载远程库代码 命令

 

3、执行以下命令:

①   cd ~/.ssh/    【如果没有对应的文件夹,则执行  mkdir  ./.ssh】

②  git config --global user.name "xb12369"

③  git config --global user.email "1234@qq.com"

④  ssh-keygen -t rsa -C "1234@qq.com"

 

4、找到C:\Users\(你自己的用户名)\.ssh 目录,里面有两个文件:id_rsa和id_rsa.pub

其他:Git生成SSH、Git生成本地库、下载远程库代码 命令

 

5、配置ssh

在你想建立SSH访问的页面配置上id_rsa.pub(把里面的公钥信息复制到你想访问的页面SSH配置上)

其他:Git生成SSH、Git生成本地库、下载远程库代码 命令

 

Git生成本地库链接远程库

git init
git add README.md
git commit -m "first commit"
git remote add origin 远程库https路径
git push -u origin master  出错试试(git pull --rebase origin master)

 

Git下载代码命令

git clone 远程库https路径

 

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2021-05-03
  • 2022-01-02
  • 2021-09-20
  • 2022-12-23
  • 2021-04-23
猜你喜欢
  • 2021-08-24
  • 2021-09-07
  • 2022-01-03
  • 2022-12-23
  • 2021-06-06
  • 2021-05-26
  • 2022-12-23
相关资源
相似解决方案