The local repository cannot be pushed. I don’t know why, because a key was generated before. I was worried that it was because of that that I deleted the key on github and regenerated it, but it still didn’t work. Obviously I added it locally and I committed, but it still prompts no such file.
I couldn’t find an answer to my problem on stack overflow.
There may be various reasons for this problem. The root cause is that your local SSH is not working properly. Please refer to all the answers in this Q&A: http://stackoverflow.com/questions/10574267/cannot-spawn-ssh-when -connecting-to-github-but-ssh-t-gitgithub-com-works
Try to find out the superficial reasons first.
It is possible that you have virtualenv enabled. Try switching to another command line client or temporarily closing virtualenv to see if the problem persists.