I am seeing this error on Ubuntu:
hg clone https://...
abort: error: _ssl.c:326: error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib
I tried clearing ~/.ssh but have had no luck connecting to the mercurial
Tonfa has the right idea. You have 2 options:
1) Get a clean certificate from another linux installation and point to that ca-certificates.crt file.
2) Replace your /etc/ssl/certs/ca-certificates.crt with a old copy or one from a clean linux install.
Related
I am trying to clone a repo on a remote Ubuntu server to my local Windows file system. Never done this before. I have TortoiseHg 0.9.3. I right-click and empty folder and in the TortoiseHg flyout I select "Clone". I enter ssh://myusername#mydomain.org/test as the source path (that's where my repo is) and the current location as the destination path. Then I hit "clone".
TortoiseHg says:
running ""C:\Program Files\TortoiseHg\TortoisePlink.exe" -ssh -2
myuser#mydomain.org "hg -R test serve --stdio"" ... no suitable
response from remote hg [command interrupted]
I then get a popup from PuTTY: "Network error: connection timed out".
Where did I go wrong? I was never asked for my password. Where do I enter that?
Fixed the problem by upgrading TortoiseHg from 0.9.3 to 2.6.x
I have the all-in-one download with TortoiseHg 2.6.1 and Mercurial 2.4.1 installed on windows server 2k8. I created a repository, served it on port 8000. There are no mercurial configuration files setup right now for this repository. No global config files either. When I try to clone this repos through eclipse (MercruialEclipse plugin) from a remote computer over the internet, I get:
abort: HTTP Error 404: Not Found
What does this mean?
Thanks.
Found the solution. The command syntax was incorrect. The incorrect syntax I was using was
hg clone http://www.xyz.com:8000/<dirname for the repo clone>
The correct command is:
hg clone http://www.xyz.com:8000/ <dirname for the repo clone>
Should also mention that I am using version 2.3.2(mercurial)
all,
I have searched for this problem for long time and tried different methods.
I want to maintain my code on the server through only SSH. But when I run this:
sudo hg clone -v ssh://carl#hostname//home/carl/Java/Projects/peta/
Mercurial keeps telling me remote: abort: There is no Mercurial repository here (.hg not found)!. Some articles said that the path should be correct and there should be a .hg directory there. But I have checked it for several times and I am sure there is a .hg folder at the right place.
I also tried
hg --config ui.remotecmd=/usr/bin/hg clone ssh://carl#hostname//home/carl/Java/Projects/peta/
But it failed as well. What other problem it could be? Thanks.
Solved
I finally fix the problem. Previously, I create a repository on my local machine, and scp all files (including .hg) on to the server. I try to remove .hg directory first, and create a repo on the server through ssh (hg init). Then hg clone works!
Extraction from hg help urls
Some notes about using SSH with Mercurial:
SSH requires an accessible shell account on the destination machine and
a copy of hg in the remote path or specified with as remotecmd.
path is relative to the remote user's home directory by default. Use an
extra slash at the start of a path to specify an absolute path:
ssh://example.com//tmp/repository
this means, at least, that you can't use the same URI and change only one/two slash it it: at least one path will be non-existent.
Consequence of the quote and error message: you must to debug (with any ssh-tool) and find correct path to needed directory. you can:
use scp (f.e) and copy known file from known location
SSH into remote host in interactive session and verify path (both?) by hand, i.e: ssh ..., cd ..., pwd, verify output of pwd
... any other debugger
When you'll get good path after login, you have to check next point of failure - .hg dir permissions
After verification of these checkpoints you'll get clone and some bonus in the form of understanding "What happened before"
HTH
I don't know if this really helps but, according to the FAQ:
hg clone ssh://USER#REMOTE/path/to/repo
They are using only one / after the USER#HOST. Maybe you can try that way.
César Bustíos's answer is almost correct, but that tries to clone from remote to local. To opposite way, we have to add the local path. In the case it is the current directory, it will be a dot.
hg clone . ssh://USER#REMOTE/path/to/repo
Hope it helps. :)
Running on Debian, to solve my problem, I have added the following line to my /var/lib/mercurial-server/.mercurial-server configuration file after the [paths]
[paths]
/ = ~/repos
...
And don't forget to issue this command afterwards: sudo -u hg /usr/share/mercurial-server/refresh-auth
I am having a problem to trigger a repository clone of googlecode project.
I keep receiving the following error:
Started by user anonymous $ hg clone
--rev default "https://username#demo.projectname.googlecode.com/hg/ " "F:\Hudson\jobs\project Demostration project\workspace" abort: demo.projectname.googlecode.com certificate error: certificate is for
*.googlecode.com, googlecode.com, *.codespot.com, *.googlesource.com, googlesource.com (use --insecure to connect insecurely) ERROR: Failed to clone.
--template {node}
Anyone know on how to tell jenkins it is safe to use that certificate? In what textbox do you place --insecure option
That's a relatively new command line option (1.8.3 I think) to get around a relatively new practice of actually checking certificates (1.8.2 I think). It's likely not exposed in the Jenkins UI. Some things you could do to work around it:
put the server's cert's fingerprint in a whitelist in your (Jenkin's user's) hgrc
wrap Mercurial in a quick shell script that passes --insecure
clone from the non-https version of the google URL (I think they still allow that)
configure the CACerts for Mercurial either globally (/etc/mercurial/hgrc) or in the Jenkins user's ~/.hgrc
Any of those should work and most of them are explained here: https://www.mercurial-scm.org/wiki/CACertificates
Windows XP, Mercurial 1.6.4
hg clone https://demas#bitbucket.org/demas/start.here
destination directory: start.here
requesting all changes
abort: error:
But if I use SSH all works fine
hg clone ssh://hg#bitbucket.org/demas/start.here
Debug info:
hg clone --debug https://demas#bitbucket.org/demas/start.here
using https://bitbucket.org/demas/start.here
http auth: user demas, password not set
sending between command
destination directory: start.here
sending heads command
requesting all changes
sending changegroup command
abort: error:
Why? And how I fix it?
Use a custom configuration to workaround the handling of self-signed certificates:
Note that per the default settings installed, connect to repositories with self-signed certificates fail with 1.7.3. You need to adjust the default configuration for that case.
References
CA Certificates in hg on Windows
hg import from a https URL fails