亚马逊AWS - 致命:无法读取“https://github.com”的用户名:没有此类设备或地址

时间:2015-03-10 04:52:00

标签: ruby-on-rails ruby-on-rails-3 amazon-web-services

我正在尝试使用AWS实例部署rails 3应用程序。对于部署,我使用opsworks服务并访问私有github存储库以进行部署。启动实例时,会出现以下错误。

[2015-03-10T04:34:32+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-03-10T04:34:32+00:00] ERROR: Running exception handlers
[2015-03-10T04:34:32+00:00] ERROR: Exception handlers complete
[2015-03-10T04:34:32+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage1/chef-stacktrace.out
[2015-03-10T04:34:32+00:00] ERROR: git[Download Custom Cookbooks] (opsworks_custom_cookbooks::checkout line 29) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote "https://github.com/user_name/repository.git" HEAD ----
STDOUT:
STDERR: fatal: could not read Username for 'https://github.com': No such device or address
---- End output of git ls-remote "https://github.com/user_name/repository.git" HEAD ----
Ran git ls-remote "https://github.com/user_name/repository.git" HEAD returned 128
[2015-03-10T04:34:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

请帮忙。

1 个答案:

答案 0 :(得分:15)

我的解决方案是在OpsWorks堆栈中编辑App Repository URL。改变它:

<强> https://github.com/user_name/repository.git

<强> git@github.com:USER_NAME / repository.git