zoukankan      html  css  js  c++  java
  • git使用ssh clone时报错

    使用ssh地址 clone 时可能会出现以下错误

    Cloning into 'music'...
    The authenticity of host 'gitee.com (*.*.*.*)' can't be established.
    ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added 'gitee.com,*.*.*.*' (ECDSA) to the list of known hosts.
    git@gitee.com: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    

    解决方案:
    先删除.ssh文件夹
    在cmd执行以下操作

    ssh-keygen -t rsa -C "仓库账号"
    一路回车
    Generating public/private rsa key pair.
    Enter file in which to save the key (C:UsersAdministrator/.ssh/id_rsa):  
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in C:UsersAdministrator/.ssh/id_rsa.
    Your public key has been saved in C:UsersAdministrator/.ssh/id_rsa.pub.
    The key fingerprint is:
    SHA256:c8bnbdAxC2/bpv93AlQKgQURlIpxVu3fgO4iMtuPigc '1793337019@qq.com'
    The key's randomart image is:
    +---[RSA 2048]----+
    |       o*Oo.     |
    |    . o o o   .  |
    |     = . . o.oo  |
    |    . .  .o ++ + |
    |        S.+ooo=  |
    |  E      +.oo+.o |
    |   .     .  ..+ o|
    |   .+.... .  ..oo|
    |  ..o=oo..    .o*|
    +----[SHA256]-----+
    

    此时已生成id_rsa.pub 文件,到github等远端仓库配置ssh公钥,即可

    码云:设置->ssh公钥
    
    github:settings->SSH and GPG keys
    
  • 相关阅读:
    5
    4
    3
    crontab -e 报错(E518: Unknown option: foldenable)
    解决无法修改日志时间的问题(Local time zone must be set--see zic manual page 2019 )
    ping测试丢包率
    关闭SELinux
    iotop使用方法
    mysql的备份
    修改uid gid 的起始范围
  • 原文地址:https://www.cnblogs.com/dch0/p/11758672.html
Copyright © 2011-2022 走看看