Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to checkout the source code from Mercurial

Tags:

mercurial

I need to download the source code from the Mercurial.

$ hg clone xmppframework.googlecode.com/hg xmppframework 
  warning: xmppframework.googlecode.com certificate with fingerprint b1:af:83:76:f3:81:b0:57:70:d8:07:42:c8:c1:b3:67:38:c8:7a:bc not verified (check hostfingerprints or web.cacerts config setting) 
  requesting all changes 
  adding changesets 
  adding manifests 
  adding file changes

I tried it in terminal by using this link to download the source code.But the command is failed.

Anyone can help me to get rid of this.

Thanks to all, Madan.

like image 878
Madan Mohan Avatar asked Feb 21 '11 13:02

Madan Mohan


People also ask

How do you pull in Mercurial?

From the main menu, choose Hg | Mercurial | Pull. Specify the required URL address of the source remote repository.

What is the use of hg command?

The hg command provides a command line interface to the Mercurial system.


1 Answers

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 this question) 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.

like image 50
evotopid Avatar answered Nov 11 '22 07:11

evotopid