kielabokkie / ssh-key-and-known-hosts-action

Setup private key and add host to known hosts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bind: Address already in use

dimisjim opened this issue · comments

Using self-hosted runners (the runner applicaiton does not run dockerized), and getting this, after a successful run:

Run kielabokkie/ssh-key-and-known-hosts-action@v1
  with:
    ssh-private-key: ***
  
    ssh-host: github.com
Starting ssh-agent
Error: Command failed with exit code 1: ssh-agent -a /tmp/ssh-auth.sock
bind: Address already in use
unix_listener: cannot bind to path: /tmp/ssh-auth.sock

I'll have to look into how to reliably check if the ssh agent is already running. Open to suggestions.

@dimisjim I've just released a new version of this action that stops the ssh-agent after the action has run. You might have to run kill -9 $(pidof ssh-agent) on your self-hosted runner first before trying the new version. After that you shouldn't have any issues anymore.

Can you please test this new version and let me know if that worked?

We don't have a single runner, and these are provisioned on the fly each day, so there's no definitive way to test this.

But will let you know if I encounter this again 👍

Thanks for the quick fix 🎉