2010-09-07 34 views
6

Tôi đang cố gắng sử dụng vải để triển khai một dự án Django và tôi nhận được lỗi này khi tôi chạy hg pull:hg pull từ bitbucket sử dụng vải

[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' 

tôi có thể chạy lệnh lanh lợi khác như hg status, và hg log chỉ tốt từ tập tin fab của tôi.

Tôi đã tạo khóa SSH trên máy chủ và thêm nó vào tài khoản bitbucket của mình. Điều này làm việc như tôi có thể SSH trong và chạy hg pull và nó hoạt động tốt, nó chỉ khi sử dụng vải.

Đây là fabfile tôi:

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") 

Bất kỳ ý tưởng?

EDIT:

Got https làm việc này bằng

nên thay vì

hg pull 

Tôi đang sử dụng

hg pull https://[email protected]/myusername/mysite 
+0

Tôi có cùng một vấn đề ở đây. Điều này giải quyết: http://lincolnloop.com/blog/2009/sep/22/easy-fabric-deployment-part-1-gitmercurial-and-ssh/ – semente

Trả lời

1

Không thể sinh sản.

zada$ fab development 
[ostars.com] Executing task 'development' 
[ostars.com] run: hg pull 
[ostars.com] out: pulling from ssh://[email protected]/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 

Lý do có thể: các phiên bản không khớp. Hoặc chỉ là một trục trặc trên Butbucket :) Hãy thử run("hg pull") để tiết lộ chi tiết hơn.

+0

Cảm ơn câu trả lời của bạn. Tôi đã thực sự có cùng một "Permission bị từ chối" vấn đề khi tôi đã sử dụng git và github (một trong những lý do tại sao tôi chuyển sang mercurial và bitbucket là lỗi này). Vì vậy, tôi sẽ có một cái nhìn vào phiên bản không phù hợp. – Neil

0

Để sử dụng SSH để sao chép hoặc kéo hoặc đẩy kho trong BitBucket bạn cần phải làm theo hướng dẫn này (tài liệu này là dành cho Mercurial trên Mac OSX hay Linux):

https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678

Nếu bạn muốn thiết lập khác ssh để làm việc với bitbucket, đây là tài liệu đầy đủ:

https://confluence.atlassian.com/display/BITBUCKET/How+to+install+a+public+key+on+your+Bitbucket+account

Các vấn đề liên quan