Replies: 2 comments 2 replies
-
|
It's been a long time I worked with this, but maybe what you are missing is SSH agent forwarding? https://docs.github.com/en/authentication/connecting-to-github-with-ssh/using-ssh-agent-forwarding |
Beta Was this translation helpful? Give feedback.
-
|
tldr; I've setup an ssh-agent through systemd and added the For anyone else dealing with this, here is what I've learned.
It would be awesome if Shipit could start a single shell session that maintained output from the previous steps. This would allow me to start an ssh-agent per deploy that could then be shutdown once the deploy is complete. # deployable_app/shipit.yml
deploy:
pre:
- eval "$(ssh-agent -s)"
- ssh-add
post:
- ssh-agent -kFor now, I had to setup a persistent ssh-agent that each application could reference using the SSH_AUTH_SOCK. # shipit/config/secrets.yml
production:
...
env:
SSH_AUTH_SOCK: 'path/to/known.socket' |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey All,
I've been working on integrating Shipit into my org and have an issue with Capistrano and the ssh-agent.
Here is my setup:
git:checkstep which checks if the remote server can pull in the repositorygit:check 01 git ls-remote [email protected]:org/repo.git HEAD 01 [email protected]: Permission denied (publickey). 01 fatal: Could not read from remote repository. 01 01 Please make sure you have the correct access rights 01 and the repository exists.What we've found is that the server has no ssh-agent connected to the deploy steps.
I found this issue which is similar to my setup but unfortunately went unanswered. I'm trying to avoid the deploy override if possible.
I saw in the templates for shipit that there is an env variable for the SSH_AUTH_SOCK but I'm unsure how to use that to connect an ssh-agent with Shipit.
Any help getting this set up would be much appreciated! I know this isn't exactly a part of Shipit; it is more about integration.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions