码迷,mamicode.com
首页 > 系统相关 > 详细

git linux git push到码云

时间:2017-12-29 18:17:17      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:自己的   use   git   email   strong   src   color   iss   title   

  • 进入https://gitee.com/profile 查看自己的账号和邮箱,记到记事本下来,下面会用到。
  • 打开Git输入命令git config –global user.name “yourname”回车
    git config –global user.email“your@email.com”回车
    技术分享图片
    $ ssh-keygen -t rsa -C “your@email.com”(请填你设置的邮箱地址)回车

接着出现:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

无视这些请继续直接按下回车

  • 直到出现
    The key’s randomart image is:
    +—[RSA 2048]—-+
    | ==++. . |
    | . ++.o . .|
    | ..o++Oo |
    +—-[SHA256]—–+技术分享图片
    这样的
  • 之后打开提示的目录下记事本打开id_rsa.pub,复制里面内容。
  • 进入自己的账号 https://gitee.com/profile/sshkeys 点击 SSH公钥
  • 技术分享图片

     

     


  • 复制的内容粘贴到Key里,Title可以不写,亲测。

     验证:$ ssh -T git@gitee.com回车 测试

 

注意:在生成密钥的时候会出现 Enter passphrase (empty for no passphrase),这一步直接输入回车 不要输入密码

git linux git push到码云

标签:自己的   use   git   email   strong   src   color   iss   title   

原文地址:https://www.cnblogs.com/wyj168/p/8145711.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!