diff --git a/README.md b/README.md index feb0cce..a7e8239 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ jobs: ... steps: - actions/checkout@v1 - # Make sure the @v0.3.0 matches the current version of the + # Make sure the @v0.4.0 matches the current version of the # action - - uses: webfactory/ssh-agent@v0.3.0 + - uses: webfactory/ssh-agent@v0.4.0 with: ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - ... other steps @@ -44,7 +44,7 @@ In that case, you can set-up the different keys as multiple secrets and pass the ```yaml # ... contens as before - - uses: webfactory/ssh-agent@v0.3.0 + - uses: webfactory/ssh-agent@v0.4.0 with: ssh-private-key: | ${{ secrets.FIRST_KEY }} @@ -55,10 +55,10 @@ In that case, you can set-up the different keys as multiple secrets and pass the The `ssh-agent` will load all of the keys and try each one in order when establishing SSH connections. There's one **caveat**, though: SSH servers may abort the connection attempt after a number of mismatching keys have been presented. So if, for example, you have -six different keys loaded into the `ssh-agent`, but the server aborts after five unknown keys, the last key (which might be the right one) will never even be tried. +six different keys loaded into the `ssh-agent`, but the server aborts after five unknown keys, the last key (which might be the right one) will never even be tried. If you don't need all of the keys at the same time, you could try to `run: kill $SSH_AGENT_PID` to kill the currently running `ssh-agent` and use the action again in a following step to start another instance. ## Exported variables -The action exports `SSH_AUTH_SOCK` and `SSH_AGENT_PID` through the Github Actions core module. +The action exports the `SSH_AUTH_SOCK` and `SSH_AGENT_PID` environment variables through the Github Actions core module. The `$SSH_AUTH_SOCK` is used by several applications like git or rsync to connect to the SSH authentication agent. The `$SSH_AGENT_PID` contains the process id of the agent. This is used to kill the agent in post job action.