Git 向 capifony 询问 Gitosis 的密码

发布于 2024-12-29 05:10:59 字数 2514 浏览 4 评论 0原文

我使用 gitosis 设置了一个服务器(yum install gitosis (CentOS 6.2))并按如下方式配置我的部署.rb:

set :application, "uda"
set :domain,      "10.0.0.59"
set :deploy_to,   "/var/www/html/"
set :app_path,    "app"

set :user,        "root"
set :use_sudo,    false
#default_run_options[:pty] = true
ssh_options[:port] = 22
set :php_bin, "/usr/bin/php"

set  :repository,  "[email protected]:uda.git"
set :scm,         :git

set :branch,      "master"

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Rails migrations will run

set :update_vendors, true

set  :keep_releases,  5

# 
# ssh_options[:forward_agent] = true
# set :model_manager, "doctrine"

set :shared_files,      ["app/config/parameters.ini"]
set :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]

当我使用 cap 启动该服务器时,部署会要求输入密码。 Gitosis 没有任何密码,所以我认为是要求 root 密码。我得到这个:

==> cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote [email protected]:uda.git master"
/Users/gitek/.ssh/config line 2: garbage at end of line; "#".
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/html/releases/20120126081107; true"
    servers: ["gureak-akademi.grupogureak.com"]
Password: 
    [gureak-akademi.grupogureak.com] executing command
    command finished in 58ms
Command git ls-remote [email protected]:uda.git master returned status code 32768

无论如何,如果我通过 ssh 连接到我的服务器并启动

root@centos ~]# git ls-remote [email protected]:uda.git master
[email protected]'s password: 

它,它会不断要求密码...

有任何帮助或线索吗?

I setup a server with gitosis (yum install gitosis (CentOS 6.2)) and configure my deploy.rb as follow:

set :application, "uda"
set :domain,      "10.0.0.59"
set :deploy_to,   "/var/www/html/"
set :app_path,    "app"

set :user,        "root"
set :use_sudo,    false
#default_run_options[:pty] = true
ssh_options[:port] = 22
set :php_bin, "/usr/bin/php"

set  :repository,  "[email protected]:uda.git"
set :scm,         :git

set :branch,      "master"

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Rails migrations will run

set :update_vendors, true

set  :keep_releases,  5

# 
# ssh_options[:forward_agent] = true
# set :model_manager, "doctrine"

set :shared_files,      ["app/config/parameters.ini"]
set :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]

When I launch that with cap deploy asks for a password. Gitosis don´t have any password, so I think is asking for root password. I´m getting this:

==> cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote [email protected]:uda.git master"
/Users/gitek/.ssh/config line 2: garbage at end of line; "#".
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/www/html/releases/20120126081107; true"
    servers: ["gureak-akademi.grupogureak.com"]
Password: 
    [gureak-akademi.grupogureak.com] executing command
    command finished in 58ms
Command git ls-remote [email protected]:uda.git master returned status code 32768

Anyway, if I connect to my server via ssh and launch

root@centos ~]# git ls-remote [email protected]:uda.git master
[email protected]'s password: 

It keekps asking for a password...

Any help or clue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冰雪梦之恋 2025-01-05 05:10:59

检查 ~/.ssh/authorized_keys 文件是否有 id_rsa.pub 内容

check ~/.ssh/authorized_keys file has id_rsa.pub content

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文