1.场景

由于我换了一台电脑,为了能访问远程仓库,我就把原来电脑上的私钥和config文件拷贝过来

2.出现问题及解决方案

git clone server:xxx_service_express

报错:

    xxxdeMacBook-Pro:php root#
Cloning into 'xxx_service_express'...
Bad owner or permissions on /var/root/.ssh/config
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.

因为我给了config 777权限,改成600就ok了(sudo chmod 600 config),继续...

git clone server:xxx_service_express

报错:

Cloning into 'xxx_service_express'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/var/root/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/var/root/.ssh/id_rsa": bad permissions
git@192.168.1.9's password:

很显然没有用到私钥嘛,让我输入密码,是给你们有一句 “Permissions 0777 for '/var/root/.ssh/id_rsa' are too open”, 私钥是只有自己访问的,也要改成600(sudo chmod 600 id_rsa), 继续...

ok

最新文章

  1. JavaScript基本语法
  2. 如何快速读懂大型C++程序代码
  3. Linux上使用SMART检测硬盘
  4. javascript 字符串相关知识汇总
  5. linux 文本处理
  6. 【PHP开源产品】Ecshop的商品筛选功能实现分析之一
  7. HTML 总结-表单-表单属性
  8. 移动端rem,scale动态设置
  9. Top K问题的两种解决思路
  10. WeQuant交易策略—NATR
  11. mongo 存储过程
  12. 制作pypi上的安装库
  13. centos7.6设置sftp服务
  14. java基础语法-内部类与匿名内部类
  15. oracle sql developer 创建数据库链接
  16. Linux之LVS 20180708
  17. Iterables vs. Iterators vs. Generators
  18. XamarinSQLite教程创建数据表
  19. Robot Framework封装的关键字输入参数可以传入多个值的方法
  20. caffe框架下目标检测——faster-rcnn实战篇问题集锦

热门文章

  1. zabbix3.2.4监控MySQL5.7.16状态
  2. vim插件快捷键
  3. docker 命令添加容器数据卷
  4. eclipse新建自定义EL函数
  5. Mysql 主从复制搭建
  6. console.log()方法中%s的作用
  7. list— 把数组中的值赋给一组变量
  8. JavaWeb CSS
  9. 如何隐藏tomcat命令窗口
  10. centos iscsi 配置