Skip to content

Commit

Permalink
Use tar dereference option (-h) to resolve symlinks (close #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Mar 22, 2016
1 parent bc8602e commit eed9526
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ IdentityFile ~/.ssh/myprivatehost_key
# otherwise will use the id_rsa key for any other host
```

#### Symlinks

In case you have symlink for any ssh file. Will be necessary map the volume of the symlink destination into the docker vault server. Otherwise will not be possible to resolve the symlink while copying the ssh files with the `ONVAULT` command.

### The private keys server

Run the server setting a volume to your `~/.ssh` folder:
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ app.get('/ssh.tgz', function (req, res) {
exec('mktemp -q /tmp/ssh.XXXXXX', function (err, stdout) {
var file = stdout.match(/(.+)/)[0];

exec('tar -c -z -C /vault/.ssh -f '+ file +' .', function (err, stdout, stderr) {
exec('tar -chz -C /vault/.ssh -f '+ file +' .', function (err, stdout, stderr) {
var filename = path.basename(file);
var mimetype = mime.lookup(file);

Expand Down

0 comments on commit eed9526

Please sign in to comment.