Git


# 一些应用

# 将本地文件上传到仓库

issue

在本地上传过程中,我每次push都无法解决,都会有这样的错误

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

唔,可能是因为我修改了一次名字。18062706139fcz -> Ryker_Feng

过程中删了一次密钥,然后重新加了一次
最后学长让我这样做然后解决了。

// 第一步
git remote remove origin
// 第二步
git remote add origin ssh地址
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

填 yes

对了,我还把用户名改回来了。

# Some Problems

  • Q1

今天clone了一个项目下来,想要commit上去,结果一直出现问题

    1. 首先是没有换到ssh访问上,据说是账号密码访问封了
    1. 其次呢,是换了之后怎么搞都传不上去
kex_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
    1. 解决是通过ssh密钥下面,把known host给删了
cd /users/yourusername/.ssh

ls

rm known_hosts