# Node Red Projects and GitHub/Balena

**URL:** <https://discourse.nodered.org/t/node-red-projects-and-github-balena/16003>\
**Category:** General\
**Created:** [27 September 2019 13:54 UTC](https://discourse.nodered.org/t/node-red-projects-and-github-balena/16003 "2019-09-27T13:54:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregorR1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorr1/32/12263_2.png) [@GregorR1](https://discourse.nodered.org/u/GregorR1)\
**Post date:** [27 September 2019 13:54 UTC](https://discourse.nodered.org/t/node-red-projects-and-github-balena/16003/1 "2019-09-27T13:54:19Z")

</div>

I'm trying to connect up my Development Device to my Balena so I can git push to deploy my program.

The issue I'm having is that I can't get the Balena integration to work. Ive created my SSH key and I've added it into my Balena settings. I created my SSH Key here:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/98d06fadf483df252bf28ebf7dc57204a8ff769b.png)

I've then got the URL from my balena application and added it as a remote:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/dffffc4cfd4d11a462a00268fa2ee6a6b7deac00.png)

When I go to the Commit History and Manage remote branch I get this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b0f30fec772abaa638d5b1381287c5f8832efbdc.png)

This spinner doesn't go away.

I have tried setting up a GitHub remote, and this works - as long as I don't also try to add a Balena remote at the same time. If I have both it asks for verification over and over.

If I try to push from the Command line I get an error saying “none of the supplied SSH keys matched a known key for user {my\_username}”.

Can anyone help?

Edit: I was trying to follow the instructions [here](https://knolleary.net/2018/09/27/deploying-node-red-applications-to-devices-using-resin-io/) but resin io has changed to balena

---

<div class="post-metadata">

**Author:** ![GregorR1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorr1/32/12263_2.png) [@GregorR1](https://discourse.nodered.org/u/GregorR1)\
**Post date:** [30 September 2019 12:37 UTC](https://discourse.nodered.org/t/node-red-projects-and-github-balena/16003/2 "2019-09-30T12:37:32Z")

</div>

The way I sorted this was by creating a ssh key through the terminal and then adding it to the ssh-agent and to balena. I'm not sure why the node-red generated ssh keys wouldn't work.

[Here](https://forums.balena.io/t/cant-get-my-node-red-to-connect-to-balena/34488/14) is a link to the forum post on the balena forum where I got the help.

[Here](https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent) is a link to the tutorial that guided me through creating the ssh key and adding it to the ssh-agent.

In case the links don't work in the future the commands I used were:

```auto
# start the ssh-agent in the background
$ eval $(ssh-agent -s)
> Agent pid 59566

```

```auto
$ ssh-add ~/.ssh/id_rsa

```

```auto
$ sudo apt-get install xclip
# Downloads and installs xclip.

$ xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard

```

Then just add the SSH key to the preferences on Balena and you're good to go.

Hope this helps anyone that has the same issue.
