zoukankan      html  css  js  c++  java
  • git版本库使用方法

    第一步需要安装好git工具,移步官网进行下载 点击进入git官网

    1.创建版本库

    • 创建一个空文件夹(我的文件版本库名称就叫gitlib)

      • mkdir gitlib
      • cd gitlib
      • git init (把gitlib这个文件夹变成git可以管理的文件夹)
    • 2.从远程库克隆项目到git版本库 (dxc1995是我的github名称,find_douban_movies_name是项目名称)

      • git clone git@github.com:dxc1995/find_douban_movies_name.git ①

    ①运行后出现以下报错

    问题描述:The authenticity of host 'github.com (52.74.223.119)' can't be established.
    RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
    git@github.com: Permission denied (publickey).
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
    问题原因:Github与ssh连接需要密钥
    解决办法:
    第一步找到自己的密钥 git命令行输入 ssh-keygen –t rsa
    然后直接一路回车
    然后默认秘钥的生成位置 是在当前用户下的 .ssh 目录下 在c盘下存储着密钥


    .pub 的那个文件是公钥, 另一个是私钥(不要泄露,妥善保存)
    用编辑器打开公钥

    全选 , 复制
    在githtb网站上配置公钥:

    然后登陆 www.github.com 网站 登陆

    登录自己的github进入项目的存储库----进入setting----部署秘钥(Deploy keys)




    出现上图显示就完成了 (我取得名字叫key这个就是随便写的)

    问题解决返回到克隆项目那步吧

  • 相关阅读:
    20120410日常记录
    20120229
    20120307
    20120411记录
    javaScript OOP学习总结
    vue.js初学习
    SQL Server 2008 r2 新建实例无法远程访问 Error:40
    SSRS 中表格报表分组字段含有NULL
    Iframe中的SSRS报表中使用windows.open在新窗口中不能打开URL中的问题
    SSIS中的Unicode,非Unicode问题
  • 原文地址:https://www.cnblogs.com/qjuly/p/12106837.html
Copyright © 2011-2022 走看看