None of the supplied SSH keys matched a known key for user `bob`

ssh

#1

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.

> git remote add resin-OTAUpdates bob@git.resin.io:bob/otaupdates.git
> git push resin-OTAUpdates master

The resin remote does show up in my list of git remotes when I run:
> git remote -v

I can push and pull to github, but it seems resin no longer likes my SSH key.

I’ve deleted and imported the SSH key from github. Still, resin rejects it.

Is this a problem because I’ve previously pushed to this resin application from a different git repository? Do I need to create a new application?


#3

FYI, I’ve added an SSH config file, per the suggestion of another post. Still no love.

> more config
Host githumb.com
IdentityFile .ssh/id_rsa
Host git.resin.io
IdentityFile .ssh/id_rsa


#4

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.


#5

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


#6

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.


#7

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


#8

Thanks _Page. I didn’t originally have a config file when I got the error. I added it, but clearly had a typo. I should’ve caught that. Thanks.