Capistrano 和 Rails 部署,无法从 ubuntu 服务器访问 bitbucket 存储库
Capistrano and Rails deployment, unable to access bitbucket repo from ubuntu server
我有一个 Ubuntu 服务器可以成功部署 Rails 项目。我创建了一个新项目,并想将其部署到同一台服务器。但是我在访问 Capistrano 部署期间存储代码的 bitbucket repo 时遇到问题。
DEBUG [60fbbd0f] Command: /usr/bin/env chmod +x /tmp/<project_name>/git-ssh.sh
INFO [60fbbd0f] Finished in 0.098 seconds with exit status 0 (successful).
INFO [b7870f98] Running /usr/bin/env git ls-remote --heads git@bitbucket.org:rmac/<project_name>.git as www-data@88.xxx.xxx.xxx
DEBUG [b7870f98] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/<project_name>/git-ssh.sh /usr/bin/env git ls-remote --heads git@bitbucket.org:rmac/<project_name>.git )
DEBUG [b7870f98] conq: repository does not exist.
DEBUG [b7870f98] fatal: Could not read from remote repository.
DEBUG [b7870f98]
DEBUG [b7870f98] Please make sure you have the correct access rights
DEBUG [b7870f98] and the repository exists.
我试过了
SSHKit::Runner::ExecuteError
和其他答案但无济于事。我检查了我的服务器进程,ssh 代理是 运行。当我的其他项目部署到服务器没有问题时,我发现很难理解。我使用的是同一台机器、相同的部署密钥、相同的 bitbucket 帐户。
有什么想法吗?
谢谢
(在聊天中找到答案)
由于正在使用 ssh-agent,请使用 ssh -A destination_server
和 git clone
确认 ssh-agent 正在运行。
由于正在部署另一个项目,请确认 Bitbucket 存储库 URL 是否正确。 (这最终成为答案)
我有一个 Ubuntu 服务器可以成功部署 Rails 项目。我创建了一个新项目,并想将其部署到同一台服务器。但是我在访问 Capistrano 部署期间存储代码的 bitbucket repo 时遇到问题。
DEBUG [60fbbd0f] Command: /usr/bin/env chmod +x /tmp/<project_name>/git-ssh.sh
INFO [60fbbd0f] Finished in 0.098 seconds with exit status 0 (successful).
INFO [b7870f98] Running /usr/bin/env git ls-remote --heads git@bitbucket.org:rmac/<project_name>.git as www-data@88.xxx.xxx.xxx
DEBUG [b7870f98] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/<project_name>/git-ssh.sh /usr/bin/env git ls-remote --heads git@bitbucket.org:rmac/<project_name>.git )
DEBUG [b7870f98] conq: repository does not exist.
DEBUG [b7870f98] fatal: Could not read from remote repository.
DEBUG [b7870f98]
DEBUG [b7870f98] Please make sure you have the correct access rights
DEBUG [b7870f98] and the repository exists.
我试过了
SSHKit::Runner::ExecuteError
和其他答案但无济于事。我检查了我的服务器进程,ssh 代理是 运行。当我的其他项目部署到服务器没有问题时,我发现很难理解。我使用的是同一台机器、相同的部署密钥、相同的 bitbucket 帐户。
有什么想法吗?
谢谢
(在聊天中找到答案)
由于正在使用 ssh-agent,请使用 ssh -A destination_server
和 git clone
确认 ssh-agent 正在运行。
由于正在部署另一个项目,请确认 Bitbucket 存储库 URL 是否正确。 (这最终成为答案)