如何使用ruby-git访问私有仓库?

时间:2019-10-15 08:38:29

标签: ruby git

我希望能够通过ruby-git访问私有存储库。

根据the docs,我可以添加这样的自定义SSH脚本:

require 'git'
Git.configure do |config|
  # If you need to use a custom SSH script
  config.git_ssh = '/path/to/ssh/script'
end

我找不到此类自定义脚本的任何示例。我试图将路径插入我的SSH密钥:

'/Users/my-user/.ssh/id_rsa'

但是在尝试请求私人仓库时,系统会提示我输入密码。显然,我插入的路径不是预期的。

我正在使用MacOs Sierra和git 1.5.0。

有人可以帮助我吗?

P.s。我已经阅读了this SO post,但似乎答案没有帮助。

0 个答案:

没有答案