Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#267 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
git, ruby, shell
Domain
devops, tooling

Research direction

Start with the git:wrapper task and its upload of git-ssh.sh, then read the related issues #154 and #191 for context on command execution as another user. Trace how command_map affects the upload and final chmod, and define done as a supported way to complete this workflow for deployuser.

Written by the indexing model from the issue text.

Description

enhancement need more info

This is related to #154, #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.

Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from capistrano/sshkit

All issues in capistrano/sshkit

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.