记录一次稍微混乱环境下的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就行了。