windows下如何down git上的代码

1.Windows下生成.ssh文件,若已经生成,则找到该文件;

   打开git 命令行:ls -al ~/.ssh    来查看是否有ssh key存在;

  

  检查/.ssh目录来查看是否存在公开的ssh key

  一般而言,公开的ssh key的文件名为以下几种:

  • id_dsa.pub
  • id_ecdsa.pub
  • id_ed25519.pub
  • id_rsa.pub 

   创建一个 SSH key :

   在你检查过存在的ssh key后,你可以新建一个ssh key:
   打开Git Bash
   输入这一串:“ ” 中的内容为公司分配的个人邮箱/自己的邮箱

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

生成了之后去你本地c://用户名//.ssh文件夹下找有两个文件,把pub打开复制到github上;

生成的地址:C:\Users\hasee\.ssh

2.测试一下该SSH key

ssh -T git@github.com 

 

注意:http://teamcode.xxxxx.net/#/dashboard/self    其中xxxxx为公司的标志

 


hasee@ZMC MINGW64 ~
$ ls -al ~/.ssh
ls: cannot access '/c/Users/hasee/.ssh': No such file or directory

hasee@ZMC MINGW64 ~
$ ssh-keygen -t rsa -C "zhangmiaocheng@xxxxx.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/hasee/.ssh/id_rsa):
Created directory '/c/Users/hasee/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/hasee/.ssh/id_rsa.
Your public key has been saved in /c/Users/hasee/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:5I/cwhM6Tps4xmgkAislERFhy1xqH0OsSWr5DrXYS9w zhangmiaocheng@fangdd.com
The key's randomart image is:
+---[RSA 2048]----+
|=*.o             |
|=.=.             |
|oB+o    .        |
|==o.o  o         |
|o+*.o   S        |
|=o.* E + =       |
|oo+o. + * o      |
|  oo++ + o       |
| . ...+          |
+----[SHA256]-----+

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值