当前位置:   article > 正文

windows下如何down git上的代码_downgit

downgit

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为公司的标志

 

  1. hasee@ZMC MINGW64 ~
  2. $ ls -al ~/.ssh
  3. ls: cannot access '/c/Users/hasee/.ssh': No such file or directory
  4. hasee@ZMC MINGW64 ~
  5. $ ssh-keygen -t rsa -C "zhangmiaocheng@xxxxx.com"
  6. Generating public/private rsa key pair.
  7. Enter file in which to save the key (/c/Users/hasee/.ssh/id_rsa):
  8. Created directory '/c/Users/hasee/.ssh'.
  9. Enter passphrase (empty for no passphrase):
  10. Enter same passphrase again:
  11. Your identification has been saved in /c/Users/hasee/.ssh/id_rsa.
  12. Your public key has been saved in /c/Users/hasee/.ssh/id_rsa.pub.
  13. The key fingerprint is:
  14. SHA256:5I/cwhM6Tps4xmgkAislERFhy1xqH0OsSWr5DrXYS9w zhangmiaocheng@fangdd.com
  15. The key's randomart image is:
  16. +---[RSA 2048]----+
  17. |=*.o |
  18. |=.=. |
  19. |oB+o . |
  20. |==o.o o |
  21. |o+*.o S |
  22. |=o.* E + = |
  23. |oo+o. + * o |
  24. | oo++ + o |
  25. | . ...+ |
  26. +----[SHA256]-----+

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/894674
推荐阅读
相关标签
  

闽ICP备14008679号