Nei*_*eil 6 python django mercurial bitbucket fabric
我正在尝试使用fabric来部署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'
Run Code Online (Sandbox Code Playgroud)
我可以运行其他mercurial命令hg status,hg log就像我的fab文件一样好.
我在服务器上生成了一个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")
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
编辑:
使用https工作了
而不是
hg pull
Run Code Online (Sandbox Code Playgroud)
我正在使用
hg pull https://myusername@bitbucket.org/myusername/mysite
Run Code Online (Sandbox Code Playgroud)
无法重现。
zada$ fab development
[ostars.com] Executing task 'development'
[ostars.com] run: hg pull
[ostars.com] out: pulling from ssh://hg@bitbucket.org/Zada/b
[ostars.com] out: no changes found
Done.
Disconnecting from ostars.com... done.
zada$ hg --version
Mercurial Distributed SCM (version 1.6.3)
zada$ ssh ostars.com "hg --version"
Mercurial Distributed SCM (version 1.6)
zada$ fab --version
Fabric 0.9.2
Run Code Online (Sandbox Code Playgroud)
可能原因:版本不匹配。或者只是 Butbucket 上的一个小故障:) 尝试run("hg pull")更详细。
| 归档时间: |
|
| 查看次数: |
2525 次 |
| 最近记录: |