リポジトリのorigin
リモートに ssh URL があるようにします。したがって、次のコード:
remote = Rugged::Remote.lookup(repo, "origin")
remote.connect(:fetch)
上げRugged::SshError: Cannot set up SSH connection without credentials
ます。
クラスがあり、のオプションを提供できるためrugged
、SSH トランスポートをサポートしているようです。しかし、ソース コードで資格情報を提供する方法がわかりません。何か不足していますか?Rugged::Credentials::SshKey
:credentials
Repository.clone_at
Remote#connect
また、ssh 経由で接続できる場合、ssh-agent から資格情報を取得する方法はありますか? ssh libgit2
-agent を照会できるようです。