Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Overriding Net::SSH::Config.default_files is not the best strategy as of today

オープン
#422 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
devops

調査の方向性

まず、リンク先の行にある lib/sshkit/backends/netssh.rb を読み、SSHKit が Net::SSH.default_files を issue で説明されている :config オプションでどのように上書きしているかを比較します。ProxyJump の動作を理解するために、net-ssh issue #587 を確認します。SSHKit が使用すべき設定パスを確定し、現在の設定の不一致なしに ProxyJump が動作することを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi, I'm currently unable to use the ProxyJump config with sshkit, due to this issue:

https://github.com/net-ssh/net-ssh/issues/587

sshkit will override Net::SSH.default_files here:

https://github.com/capistrano/sshkit/blob/158c2867071e015a117e188d1a0ee7b579c9b24e/lib/sshkit/backends/netssh.rb#L13

By the way, is there any reasons to do that instead of something simpler like:

Net::SSH::Config.default_files << File.join(Dir.pwd, '.ssh/config')

Either way, net-ssh doesn't work the same way when the :config option is used in Net::SSH.start and when passed to default_files, as you could see in the issue I mentioned above.

Currently I'm in a rush to try to meet some tight deadlines for a new project I started and it will last a few months at least. If I were to find some time to contribute it would be more likely to provide some patch to sshkit to use the :config option instead of overriding default_files as it seems a simpler/quicker change for someone new to both projects, in my opinion. Before I do so, I'd like to check on your opinion. Is there anyone here that is comfortable with net-ssh source and would be willing to contribute to it by providing the "-F" option to the ssh client for each of those default_files? Otherwise, would you be willing to accept a patch that would change the current approach in sshkit so that this default configuration would be passed to the :config option instead of overriding default_files?

Thanks for your time to read all of this :)

主要言語
Ruby
スター
1.2k
フォーク
257
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

capistrano/sshkit のほかの issue

capistrano/sshkit の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。