git 上传项目到服务器

Linux上git基本操作1.本地clone码云上的项目: [dinghuanhuan@centos6_master ~]cdgitee/[dinghuanhuan@centos6mastergitee]cdgitee/[dinghuanhuan@centos6mastergitee] cd gitee/ [dinghuanhuan@centos6_master gitee] mkdir...
摘要由CSDN通过智能技术生成

码云公钥管理

1.Linux上对git进行全局配置
该配置只需做一次且对该Linux主机上所有git管理项目生效:

[dinghuanhuan@centos6 ~]$>git config --global user.name "dinghuanhuan"
[dinghuanhuan@centos6 ~]$>git config --global user.email "736787419@qq.com"

2.Linux上生成SSH key:

[dinghuanhuan@centos6 ~]$>ssh-keygen -t rsa -C "736787419@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/dinghuanhuan/.ssh/id_rsa): 按回车
/home/dinghuanhuan/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 按回车
Enter same passphrase again: 按回车
Your identification has been saved in /home/dinghuanhuan/.ssh/id_rsa.私钥
Your public key has been saved in /home/dinghuanhuan/.ssh/id_rsa.pub.公钥
The key fingerprint is:
40:cd:95:07:23:ae:41:01:3b:92:11:5d:02:28:3e:fd 736787419@qq.com
The key's randomart image is:
+--[ RSA 2048]----+
| .++oo=+..+o     |
|o  o.= .o....    |
|o + o o .  .     |
| o o . +         |
|  . . . S        |
|     E           |
|                 |
|                 |
|                 |
+-----------------+

3.上传Public Key:
查看public key并拷贝,将他添加到码云个人帐号的SSH公钥里:

[dinghuanhuan@centos6 ~]$>cat ~/.ssh/id_rsa.pub 
ssh-rsa xxx== 736787419@qq.com

4.公钥添加测试

[dinghuanhuan@centos6 gitee]$>ssh -T git@git.oschina.net
Warning: Permanently added the RSA host k
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值