Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Feature: Ability to login as one user and run all tasks as another

未关闭
#262 21 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby
领域
devops

调研方向

首先查看链接的 sshkit-backends-netssh_global backend,并将其实现方式与现有的 SSHKit 测试套件进行比较;issue 说明应遵循该测试套件的风格和方法。完成标准是:核心 SSHKit 能够以一个用户的身份登录,同时以另一个用户的身份运行命令,支持所描述的全局选项,并且无需重新实现现有的 Capistrano tasks。

由索引模型根据 Issue 内容生成。

描述

enhancement need more info

We've created a backend that allows Capistrano 3 to work with setups that require users to login in as user A, but run all commands as user B.

The backend essentially sets a global owner and all tasks (unless explicitly overridden) will run as this user. There are a few other options that can also be globally configured (this helps get around certain use cases) such as directory and the ability to forward an SSH agent to the owner for certain commands. This means the existing Capistrano tasks do not need to be reimplemented (instead the backend is switched).

While this kind of server setup is not recommended or ideal, when coming across one it's still useful to be able to use Capistrano to deploy.

The code is pretty ugly at the moment, subclassing and overriding a lot of private methods. However, if core sshkit are interested this could easily be cleaned up. The test suite style and methodology has been retained to try and make it as easy as possible to merge into core sshkit.

Does this look like a feature that you would be interested in merging into core? If so I can raise a PR.

主要语言
Ruby
星标
1.2k
派生
257
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

capistrano/sshkit 的其他 Issue

查看 capistrano/sshkit 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。