Git相关

  1. 重装系统后,git访问远端被拒:
    Access denied.
    
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights and the repository exists.

    解决方案:在远端添加SSH Key:
    本地生成key:

    ssh-keygen -t rsa -C "SubmarineX@SubmarineX.cn"# Creates a new ssh key using the provided email
    
    # Generating public/private rsa key pair...

    显示公钥内容

    cat ~/.ssh/id_rsa.pub
    
    # ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....

    复制公钥内容并在远端添加即可(注意不是Deploy key)。

你可能感兴趣的:(git)