Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-agent not starting on container based workflow #65

Closed
shashank11p opened this issue Mar 4, 2021 · 4 comments
Closed

ssh-agent not starting on container based workflow #65

shashank11p opened this issue Mar 4, 2021 · 4 comments

Comments

@shashank11p
Copy link
Contributor

shashank11p commented Mar 4, 2021

I am running a workflow on ubuntu-20.04 with container centos:7.

job-name:
    runs-on: ubuntu-20.04
    container:
      image: centos:7
    steps:
      - uses: webfactory/ssh-agent@v0.5.0
        with:
          ssh-private-key: |
            ${{ secrets.SSH_KEY }}
            ${{ secrets.SSH_KEY_2 }}

I get this error while starting the ssh-agent.

Adding GitHub.com keys to /root/.ssh/known_hosts
Starting ssh-agent
Error: spawnSync ssh-agent ENOENT

Can someone help me fix this?

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

Your container does not have the SSH package (whatever it is named in CentOS, IDK) installed.

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

I knew that answer because I ran into this myself...

Today, we added a new section in the README with known problems/tips. Feel free to add a PR with a notice for container based workflows if you like.

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

Even better, would you know how to improve the code and print a helpful error message in this case?

@shashank11p
Copy link
Contributor Author

Thanks @mpdude. I have created a PR for updating Readme. #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants