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
    
  • 相关阅读:
    BZOJ 2574: [Poi1999]Store-Keeper
    BZOJ 1024: [SCOI2009]生日快乐
    BZOJ 2541: [Ctsc2000]冰原探险
    hihoCoder 1303 数论六·模线性方程组
    Codeforces 710 D. Two Arithmetic Progressions
    BZOJ 1670: [Usaco2006 Oct]Building the Moat护城河的挖掘
    ZJOI2014 2048
    51Nod 1766 树上的最远点对
    Codeforces 727 F. Polycarp's problems
    BZOJ 3736: [Pa2013]Karty
  • 原文地址:https://www.cnblogs.com/dch0/p/11758672.html
Copyright © 2011-2022 走看看