解决码云未配置公钥问题——fatal: Could not read from remote repository.

使用码云,键入“git push -u origin master” ,遇到如下问题:
fatal: Could not read from remote repository.(致命:不能读远端仓库。)

解决码云未配置公钥问题——fatal: Could not read from remote repository.

网上查找后,发现都是用github的解决方案,缺少码云的解决方案,在这将解决过程写出来:
A. 如果你也是初次使用码云,且没有设置过ssh key,请按照如下:

     1.键入:ssh-****** -t rsa -C "你***云的邮箱" ,然后一路"Enter”

     2.打开:C:\Users\你的用户名/.ssh/id_rsa.pub

     3.复制:Notepad++打开上述文件,全部复制

解决码云未配置公钥问题——fatal: Could not read from remote repository.

B. 添加公钥

    1.在码云,点击右上角“小圆圈”,点击设置

解决码云未配置公钥问题——fatal: Could not read from remote repository.

              2.左边一侧,点击 SSH公钥

解决码云未配置公钥问题——fatal: Could not read from remote repository.
              3.将 上述 A.3 复制内容,粘贴到如下方框,点击 确定

解决码云未配置公钥问题——fatal: Could not read from remote repository.
              4.输入你的码云密码 ,点击 验证

解决码云未配置公钥问题——fatal: Could not read from remote repository.
              5.验证成功后显示如下(本人就是输入了3次才成功,如果你也失败,多验证几次)

 解决码云未配置公钥问题——fatal: Could not read from remote repository.

C. 再次键入“git push -u origin master”,若出现如下,git pull, 就OK了

解决码云未配置公钥问题——fatal: Could not read from remote repository.

D. 附:可参看 https://gitee.com/help/articles/4191#article-header0

再附一个参考链接 https://www.cnblogs.com/qianshouxiuluo/p/11778559.html