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