# git push fails with ssh key not found and error message is out of date

**URL:** <https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206>\
**Category:** Product support\
**Tags:** ssh\
**Created:** [April 12, 2022, 2:19pm UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206 "2022-04-12T14:19:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [April 12, 2022, 2:19pm UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/1 "2022-04-12T14:19:29Z")

</div>

Hey,

It’s been a few years since I’ve worked with Balena, so I’m still doing things the old way with git push. I my balena user name is jason10 but my github account is under drjasonharrison. I suspect that I after I imported keys from github I need to configure my ~/.ssh/config to help with the username.

Here’s the error message I get

```auto
Warning: Permanently added the ECDSA host key for IP address '3.221.16.120' to the list of known hosts.

	############################################################################

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

	Known ssh key fingerprints for `jason10`:
		* 5813566518050886f8c87a1b5020526d
		* fac74f3a74f24a353ac14fc13d23a5b0

	Please make sure you've configured your keys correctly.
	https://balena.io/docs/getting-started/#adding-an-ssh-key

	############################################################################

jason10@git.balena-cloud.com: 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.

```

Note that the webpage gets redirected to [Get started with Raspberry Pi 3 and Node.js - Balena Documentation](https://www.balena.io/docs/learn/getting-started/raspberrypi3/nodejs/#adding-an-ssh-key) which now discusses using the Balena CLI.

Is there a webpage that discusses the ~/.ssh/config for balena? Couldn’t find it in the docs or through google (with site:balena.io/docs). Will probably have to hit stackoverflow.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 15, 2022, 11:40am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/2 "2022-04-15T11:40:30Z")

</div>

Hello @jason10 thank you for your message!

I contacted with the CLI team to solve the Link issue. The correct URL (if i’m not wrong) might be [https://www.balena.io/docs/learn/manage/ssh-access/#add-an-ssh-key-to-balenacloud](https://www.balena.io/docs/learn/manage/ssh-access/#add-an-ssh-key-to-balenacloud)

On the other hand, related with the current issue i understand that you are deploying a project from a `drjasonharrison` repo. And of course, you introduced your github public key from `drjasonharrison` on balenaCloud, right? could you please check on `Settings > SSH keys` [here](https://dashboard.balena-cloud.com/preferences/sshkeys)?

Not sure you need anything else. Confirm me this, and i will try to reproduce myself 🙂

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 15, 2022, 11:52am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/3 "2022-04-15T11:52:40Z")

</div>

@jason10 i tried to reproduce and it worked on my side!

Could you also confirm the `git remote add balena` that you used?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 22, 2022, 9:48am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/8 "2022-04-22T09:48:38Z")

</div>

Hello @jason10 could you please confirm if this is now working for you?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [April 25, 2022, 4:56am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/10 "2022-04-25T04:56:00Z")

</div>

Hi Marc,

The corrected URL appears to be correct.  
My balena account has an email of `drjasonharrison` but balena username `jason10`  
I would have used the provided command from the “add release” dialog:

`git remote add balena jason10@git.balena-cloud.com:jason10/sit-stand-desk-rpi3.git`

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 27, 2022, 11:23am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/11 "2022-04-27T11:23:01Z")

</div>

@jason10 after speaking with a colleague it looks like this is balena’s fault when this is run from specific OS. Out of curiosity are you running Fedora or similar?

Our temporary workaround that can be used while a definitive solution does not yet exist:

- Either add `PubkeyAcceptedKeyTypes +ssh-rsa` to SSH configuration
- or prefix your git commands with `GIT_SSH_COMMAND="ssh -vvvv -oPubkeyAcceptedKeyTypes=+ssh-rsa" git push balena`
- or use a different algorithm for the key ( `ecdsa` or `ed25519` should work fine)

Change ` .ssh/config` to refer to the custom named identify file? `e.g. id_balena / id_balena.pub`

Let us know if that works! Thank you for your patience!

---

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [April 27, 2022, 2:18pm UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/13 "2022-04-27T14:18:09Z")

</div>

@mpous thanks. I’m on macOS 11.6.  
SSH: OpenSSH\_8.1p1, LibreSSL 2.7.3  
GIT: git version 2.33.0

The balena cli is working fine, I will try your suggestions and let you know eventually.

---

<div class="post-metadata">

**Author:** ![jason10](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jason10/32/1464_2.png) [@jason10](https://forums.balena.io/u/jason10)\
**Post date:** [April 28, 2022, 3:52pm UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/14 "2022-04-28T15:52:38Z")

</div>

Added this to my ~/.ssh/config file

```auto
Host git.balena-cloud.com
    HostName git.balena-cloud.com
    User jason10
    IdentityFile ~/.ssh/github_id_rsa

```

---

<div class="post-metadata">

**Author:** ![vipulgupta2048](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vipulgupta2048](https://forums.balena.io/u/vipulgupta2048)\
**Post date:** [May 31, 2022, 3:59pm UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/15 "2022-05-31T15:59:43Z")

</div>

Thanks for sharing this, I assume thing are working fine for you now, Jason?

---

<div class="post-metadata">

**Author:** ![jairo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/jairo/32/4743_2.png) [@jairo](https://forums.balena.io/u/jairo)\
**Post date:** [October 25, 2022, 1:38am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/18 "2022-10-25T01:38:02Z")

</div>

I just upgraded to Ubuntu 22.10 and out of nowhere started receiving the same message.  
The bit that solved the annoying message was: `PubkeyAcceptedKeyTypes +ssh-rsa` in `/etc/ssh/ssh_config`  
I know the topic is solved but just wanted to bump here to update and include the keywords in case someone gets the same error 😉

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [October 25, 2022, 9:03am UTC](https://forums.balena.io/t/git-push-fails-with-ssh-key-not-found-and-error-message-is-out-of-date/356206/19 "2022-10-25T09:03:25Z")

</div>

Thanks for sharing your solution @jairo 🙌
