我正在尝试使用结构来部署 Django 项目,但在运行时出现此错误hg pull
:
[myusername.webfactional.com] run: hg pull
[myusername.webfactional.com] out: remote: Warning: Permanently added the RSA host key for IP address '207.223.240.181' to the list of known hosts.
[myusername.webfactional.com] out: remote: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
[myusername.webfactional.com] err: abort: no suitable response from remote hg!
Fatal error: run() encountered an error (return code 255) while executing 'hg pull'
我可以从我的 fab 文件中运行其他 mercurial 命令,例如hg status
,就可以了。hg log
我在服务器上生成了一个 SSH 密钥并将其添加到我的 bitbucket 帐户中。这很有效,因为我可以通过 SSH 登录并运行hg pull
它,而且效果很好,只有在使用织物时才有效。
这是我的fabfile:
from __future__ import with_statement
from fabric.api import *
env.hosts = ['myusername.webfactional.com']
env.user = "myusername"
def development():
# Update files
local("hg push")
with cd("~/webapps/mysite/mysite"):
run("hg pull")
# Update database
with cd("~/webapps/mysite/mysite"):
run("python2.6 manage.py syncdb")
run("python2.6 manage.py migrate")
# Reload apache
run("~/webapps/mysite/apache2/bin/restart")
有任何想法吗?
编辑:
使用https得到这个工作
所以而不是
hg pull
我在用着
hg pull https://myusername@bitbucket.org/myusername/mysite