gpt4 book ai didi

ruby-on-rails - 自从我移到bitbucket以来,在cap部署期间出现权限被拒绝(公钥)

转载 作者:行者123 更新时间:2023-12-02 14:37:51 25 4
gpt4 key购买 nike

我最近将git repo移到了bitbucket上,现在由于出现此错误而无法部署应用程序:

 INFO [5a4fa711] Running /usr/bin/env git remote update on mysite.com
DEBUG [5a4fa711] Command: cd /var/www/mysite/repo && /usr/bin/env git remote update
DEBUG [5a4fa711] Fetching origin
DEBUG [5a4fa711]
DEBUG [5a4fa711] Permission denied (publickey).
DEBUG [5a4fa711]
DEBUG [5a4fa711] fatal: The remote end hung up unexpectedly
DEBUG [5a4fa711]
DEBUG [5a4fa711] error: Could not fetch origin
...
Tasks: TOP => git:create_release => git:update
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Command::Failed: git stdout: Nothing written
git stderr: Nothing written

我正在使用capistrano 3,这是应该从我的部署文件转发我的ssh选项的部分:
set :ssh_options, {
user: fetch(:user),
password: fetch(:password),
keys: %w(~/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey password),
port: 90
}

我在本地计算机上的公钥已经在bitbucket上,并且可以正常工作:
$ ssh -T git@bitbucket.org
logged in as myuser.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

有什么建议么?

最佳答案

看来我服务器上的var/www/mysite/repo文件夹对我的旧仓库(非bitbucket仓库)有一些git引用,所以我刚刚删除了该文件夹。瞧!

关于ruby-on-rails - 自从我移到bitbucket以来,在cap部署期间出现权限被拒绝(公钥),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23773162/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com