前言: git执行命令,报下面错误。 解决方案: 1、首先删除自己电脑上.ssh文件夹内容 2、输入下面命令,然后一直回车 ssh-keygen -t rsa -C “username” 其中 username 是你的git账户名 3、查看公钥内容 cat ~/.ssh/id_rsa.pub 上图中除了最后的我们的用户名之外,其他的都是公钥内容。 4、打开码云页面中我的设置,将刚才获得公钥 复制到里面即可。