1.安装 git

  

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
sudo apt-get install git
配置 git 文件
git config --global user.name "你的用户名"
git config --global user.email "你的邮箱"

2.在码云注册账号

    1.创建仓库

      Ubunto使用 码云 创建项目 随笔 第1张

      2.创建仓库

          填写仓库名称  并选择语言

        Ubunto使用 码云 创建项目 随笔 第2张

          3.添加公钥    下面有讲到生成公钥  在这里复制并选择保存

           Ubunto使用 码云 创建项目 随笔 第3张

      

      

 2.在虚拟机配置

    1.ssh-keygen  运行  生成公钥

    Ubunto使用 码云 创建项目 随笔 第4张

    生成后  cd ~/.ssh  并查看公钥 

            Ubunto使用 码云 创建项目 随笔 第5张

     将公钥填写到 码云的公钥里 并点击保存

 

2.创建文件夹

Ubunto使用 码云 创建项目 随笔 第6张

 

3.进入文件夹

  1.初始化 git 仓库

    myprojects$ git init

  2.然后在 码云仓库 点击克隆/下载  复制ssh连接地址

    Ubunto使用 码云 创建项目 随笔 第7张

  3.在主机上 运行 git clone  地址

  Ubunto使用 码云 创建项目 随笔 第8张

 

这样就与 码云建立了连接

  

          

    

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄