我在github上创建了一个repo,当我从 cygwin 推送我的提交时,它运行正常:
$ git push
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 407 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To git@github.com:-----------
但是,当我尝试从 Windows命令行执行完全相同的操作时,git commit
正常工作,git push
会出现以下错误:
Warning: Permanently added the RSA host key for IP address '192.--------' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
我有一个SSH添加到github,但我是否需要为命令行添加另一个?我是新手,所以会很高兴为什么会这样。