capistrano / capistrano/sshkit

Feature: git:wrapper user when uploading git-ssh.sh

Open
#267 6 comments 0 reactions 0 assignees View on GitHub
enhancement need more info
Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

This is related to [#154](https://github.com/capistrano/sshkit/issues/154), [#191](https://github.com/capistrano/sshkit/issues/191), and probably others.

I'm trying to run all of the commands as a different user than the one I connect with, and it works in general with the following:

```
SSHKit.config.command_map = Hash.new do |hash, command|
hash[command] = "sudo -u deployuser #{command}"
end
```

But the git:wrapper task does an upload of git-ssh.sh file, which ends up with my user as the owner, not deployuser. The last line of the task then fails because it tries to run chmod on this file as deployuser.

Is there a way to control the permissions on upload? I'm not too familiar with this part of capistrano and the purpose of the git:wrapper/how it works, so maybe trying to play with the permissions on that file isnt the solution, but any kind of workaround or general guidance would be appreciated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.