# Github integration: generate new ssh key throws error

**URL:** <https://discourse.nodered.org/t/github-integration-generate-new-ssh-key-throws-error/14045>\
**Category:** General\
**Created:** [6 August 2019 08:40 UTC](https://discourse.nodered.org/t/github-integration-generate-new-ssh-key-throws-error/14045 "2019-08-06T08:40:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![echtelerp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/echtelerp/32/535_2.png) [@echtelerp](https://discourse.nodered.org/u/echtelerp)\
**Post date:** [6 August 2019 08:40 UTC](https://discourse.nodered.org/t/github-integration-generate-new-ssh-key-throws-error/14045/1 "2019-08-06T08:40:53Z")

</div>

Hi there,

when I try to generate a new github ssh key in node red, running in a docker container, based on alpine, on a arm32v7 base image,  
Nodered throws this error.

can be repeated doing this:  
docker run -d -p1880:1880 --name nodered echteler/nodered:balluff\_arm\_dev  
when the prompt tells you to generate a new ssh key to clone a repo, NR crashes with those logs:

```auto

Welcome to Node-RED
===================

6 Aug 08:32:11 - [info] Node-RED version: v0.20.7
6 Aug 08:32:11 - [info] Node.js version: v10.15.3
6 Aug 08:32:11 - [info] Linux 4.9.184-linuxkit arm LE
6 Aug 08:32:14 - [info] Loading palette nodes
6 Aug 08:32:32 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
6 Aug 08:32:32 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
6 Aug 08:32:34 - [info] Dashboard version 2.15.5 started at /ui
6 Aug 8:32:34 - [s7comm-Error] - Installation of Module net-keepalive failed because we might be on the wrong OS. OS=linux
6 Aug 8:32:34 - [s7comm-Info] - Debug configuration for logLevelNodeS7:{"debug":0,"silent":true}
6 Aug 8:32:34 - [s7comm-Info] - Debug configuration for logLevelNodeRED:{"debug":2,"silent":true}
6 Aug 08:32:36 - [info] Settings file : /data/settings.js
6 Aug 08:32:36 - [info] Context store : 'default' [module=memory]
6 Aug 08:32:36 - [info] User directory : /data
6 Aug 08:32:36 - [warn] No active project : using default flows file
6 Aug 08:32:36 - [info] Flows file : /data/flows.json
6 Aug 08:32:37 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

6 Aug 08:32:37 - [info] Starting flows
6 Aug 08:32:37 - [info] Started flows
6 Aug 08:32:37 - [info] Server now running at http://127.0.0.1:1880/
6 Aug 08:34:16 - [red] Uncaught Exception:
6 Aug 08:34:16 - Error: spawn ssh-keygen ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-red-docker@1.0.0 start: `node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/data"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-red-docker@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /usr/src/node-red/.npm/_logs/2019-08-06T08_34_17_152Z-debug.log 

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [6 August 2019 08:50 UTC](https://discourse.nodered.org/t/github-integration-generate-new-ssh-key-throws-error/14045/2 "2019-08-06T08:50:55Z")

</div>

You need to make sure the `ssh-keygen` command is installed in your docker image for this to work.

Node-RED should also handle this better and not crash fatally. If you can raise as issue [here](https://github.com/node-red/node-red), we can address that part of it.

---

<div class="post-metadata">

**Author:** ![echtelerp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/echtelerp/32/535_2.png) [@echtelerp](https://discourse.nodered.org/u/echtelerp)\
**Post date:** [6 August 2019 08:57 UTC](https://discourse.nodered.org/t/github-integration-generate-new-ssh-key-throws-error/14045/3 "2019-08-06T08:57:51Z")

</div>

Hi Nick,

thank you for your fast answer.  
indeed, i missed to add ssh-keygen to the base image.  
already fixed it 🙂

I'll also raise the issue quickly 🙂

have a great day
