现在的位置: 首页 > 综合 > 正文

ubuntu 下向Bitbucket上传代码遇到的问题

2013年09月21日 ⁄ 综合 ⁄ 共 2558字 ⁄ 字号 评论关闭

Q:中止: 此处没有水银版本库(没有找到 .hg)!

A:hg init

Q:

yu@MCW-xnYu:~/memcache/Bitbucket_repository$ hg clone ssh://hg@bitbucket.org/***/***
The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)? yes
remote: Warning: Permanently added 'bitbucket.org,207.223.240.182' (RSA) to the list of known hosts.
remote: Permission denied (publickey).
中止: no suitable response from remote hg!

A:

http://www.ganguoyuan.com/06/linux%E4%B8%ADssh%E7%99%BB%E5%BD%95permanently-added-rsa-to-the-list-of-known-hosts%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3/

Q:

Mercurial: warning: bitbucket.org certificate with fingerprint XXXXXXXXX not verified (check hostfingerprints or web.cacerts config setting)

A:

http://tadabborat.tumblr.com/post/9502320721/mercurial-warning-bitbucket-org-certificate-with

Q:

warning: bitbucket.org certificate with fingerprint 24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b not verified (check hostfingerprints or web.cacerts config setting)

Q:

The solution1:

Add the following lines to the .hgrc file which is located in your home directory (if the file is not there create it).

 
[hostfingerprints]
www.bscmsrc.eu = e1:0e:46:81:37:20:33:aa:42:c0:98:d7:e9:7f:c6:19:7a:ee:d5:37

 

Assuming that e1:0e:46:81:37:20:33:aa:42:c0:98:d7:e9:7f:c6:19:7a:ee:d5:37 is the fingerprint for your host (displayed in the warning message).

And this should be enough to not see the warning message anymore.

The solution2:

from

http://stackoverflow.com/questions/5066696/how-to-checkout-the-source-code-from-mercurial

The problem is, that you didn't added the fingerprint of google to your hgrc file.There are two ways to solve the problem:

  1. Use http instead of https, the disadvantage would be, that your traffic isn't encrypted anymore.

    hg clone http://xmppframework.googlecode.com/hg/ xmppframework

  2. Or add the fingerprint to you hgrc file:
    Please note that Google Code is changing the fingerprint sometimes. When the fingerprint below doesn't work, you can use this command (taken from thisquestion)
    to detect the current fingerprint:

    $ openssl s_client -connect xmppframework.googlecode.com:443 < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin

                [hostfingerprints]

    xmppframework.googlecode.com = b1:af:83:76:f3:81:b0:57:70:d8:07:42:c8:c1:b3:67:38:c8:7a:bc

Edited because original answer was ugly.

Q:

abort: no username supplied (see "hg help config")

A:

在hg中输入commit 指令时,如果出现下述结果:

$ hg commit

abort: no username supplied (see "hg help config")

则按照下述步骤进行设置

Step 1:在当前目录中输入:

$ cd .hg

Step 2:修改在.hg目录下的hgrc文件:

$ notepad hgrc

hgrc文件的内容为:

[paths]
default = http://www.selenic.com/repo/hello

Step 3:在该文件中加入下述代码:

[ui]
username = Ethan Zhang <Zhang@example.com>

username后面可以是只有名称或E-mail,上面是完整的显示方式。

抱歉!评论已关闭.