记录一次稍微混乱环境下的 github 使用经验。

今天 GitHub 测试账号 fork 一个项目修改提交时,出现了以下报错:

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 341 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/LXSakura/Interest.blog.git
 ! [remote rejected] master -> master (permission denied)
error: failed to push some refs to 'https://github.com/LXSakura/Interest.blog.git'

没有见过,一时愣了下,试试 svn,结果提交时报 “svn: E160024: MERGE failed”。

Google 之,发现原来是 GitHub 缺少 SSH Keys, 随便启动个容器创建了密钥对,把公钥新建上去重新 push 就行了。

·End·