Hello. I’ve been trying to push a C file to an application. I was able to do this yesterday, but today I decided to create a new repository, rather than try and push from a subdirectory in an existing repository that has a lot of other code in it.
I created a new repository on github, and can push and pull code to/from that repository.
However, I now get this SSH error when I try and push it to my resin application.
Creating a new application has solved the problem. I can see why “polluting” an application’s git repository with unrelated code causes a problem, but I don’t know why this would create an SSH key problem.
Hey @bob, can you provide the full error message you’re receiving? I would expect you to see an error along the lines of “non-fastforward push was rejected” due to having previously pushed code to that application, however I would not expect to see any error about the ssh key. For the error I’d expect due to having previously pushed commits then the solution is to instead use git push resin-OTAUpdates master -f in order to force overwriting the existing commits
Sure; here’s the entire error message. I agree, the SSH key problem is what’s really confusing here.
git push resin-OTAUpdates master
no such identity: .ssh/id_rsa: No such file or directory
############################################################################
None of the supplied SSH keys matched a known key for user `bob`
Known ssh key fingerprints for `bob`:
* 89e9edf82d9487ef465ffbdc0799b707
Please make sure you've configured your keys correctly.
http://docs.resin.io/getting-started/#adding-an-ssh-key
############################################################################
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Ah, in that case your .ssh/config file is probably the issue, it’s using a relative path which fails when you try to push the resin app, as evidenced by the no such identity: .ssh/id_rsa: No such file or directory part (it works for github.com as the config file is for githumb.com). If you either remove that config or change the .ssh/id_rsa to ~/.ssh/id_rsa then the correct key should start being used