zoukankan      html  css  js  c++  java
  • git公私钥的拷贝

    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

  • 相关阅读:
    20170612测试
    vijos1453曼哈顿距离
    vijos1153 猫狗大战
    vijos1037搭建双塔
    dijkstra+priority_queue+vector
    BZOJ1507: [NOI2003]Editor
    dinic模板
    旅行-树形DP
    51nod1799-二分答案
    51nod1791-合法括号子段
  • 原文地址:https://www.cnblogs.com/wangweiwen/p/7216751.html
Copyright © 2011-2022 走看看