I'm trying to use a Centos VPS as a place to host my mercurial repositories, I'll init these repositories on the server and then clone them to my local computer using TortoiseHG.
I've setup a clean VPS with Centos 6 and taken the usual security steps such as root login disabled, changed ports, ssh key access only and a new user user123.
I connect to the server using pageant and ssh keys generated using puttygen.
I've setup a virtualhost that's only accessible to my local machines ips that's located at /var/www/vhosts/hg/ all of my repositories are then accessible using http://123.123.123.123/repositoryname/
I've used yum install mercurial and can create repositories using hg init.
I can then succesfully clone my repositories to a local machine using the above url.
The problem
So far so good, however the issues arise when I try to push. At the moment I've not setup any sort of connection I'm just simply going on that I've been able to clone so I should be able to push (moronic).
However when I do try and push I get the following error from TortoiseHG:
abort: destination does not support push - command returned code 255
How do I go about adding support to be able to push to the above server configuration? Should I try and get it to use pageant or do I need additional server software so support pushing?
I'm not really sure of what the next step is and Googling hasn't yielded any success.
all of my repositories are then accessible using http://123.123.123.123/repositoryname/
Bad configuration... and probably totally wrong idea of using http, when you have ssh
Which http-frontend do you use?
Did you integrate (any) frontend with Mercurial?
Have you push enabled?
In case of ssh://-served repositories your task may be a lot simpler
Related
I'd like to access the git commit hash and tag, say using git describe, but the openshift virtual machines seem to have no git repository (readable by me anyway).
Is there any way to access this information using the openshift deployment hooks? I'd like to be able to have each instance log the version (ie tag/commit hash) it's running.
At the moment, my best option seems to be to write a deployment script, and use rhc scp to push the version string to the server, but it feels a bit hacky.
Thanks!
can anyone help with this.
I am using Jenkins to deploy a build to a remote server, so far so good. However, I want to run JUnit tests on that remote server, but I cannot find how to do this within Jenkins. I have tried it within the ANT but it gives me an error regarding the junit.jar.
I believe that the tests are executing locally rather than remotely.
Any help would be appreciated; Jenkins is a very new experience to me.
Initially you have to be aware of few things. Jenkins is a CI tool which built with plenty of features to make things automated. If you need to run tests on remote server, then follow the sequences to create such a setup :
Install jenkins on a Machine and properly configure it as CI-Server.
Deploy your remote server with necessary tools and configure well.
On Jenkins server, install SSH plugin to run jobs on remote machine via ssh.
Add the remote server as slave node under Jenkins -> Manage Jenkins -> Manage Nodes -> Add Node menu on Jenkins server.
Configure the node as per your requirement.
Create a new job which could run the junit tests with pre/post build actions in jenkins.
Finally schedule the build for slave node and kick it off.
For step by step instructions, refer this answer.
My team has been using mercurial for a while. We use ssh to connect to a central remote repository. Haven't had any issues with pushing or pulling over ssh to remote repos... until today!
Everyone else is on the LAN, i work remotely and connect to the LAN with vpn (cisco). No one else is having problems now, but suddenly, no matter what I try, I get "no suitable response from remote hg!"
I am able to access everything else on the LAN, and I can even ssh (in a terminal) into the remote server holding the remote repositories.
Here is the output using the debug command
sending hello command
sending between command
no suitable response from remote hg
so, turns out my rsa key mysteriously disappeared from the list in PageAnt, and once I added it back in, everything works properly. strange, but resolved
I am attempting to run a Windows batch script nightly to pull a fresh copy of data to my local hard drive from a Mercurial repository, overwriting any data I have locally. The server on which the repository is located has many repos, so is located in a sub-directory on the server. I have set up PuTTY to use an RSA key so when I log onto the server with PuTTY, I need only enter my username.
The batch script has a command:
hg pull ssh://myusername#mydomain.com/targetrepo/
...but this only opens a prompt for me to enter my password. Normally, this would be fine but because the pull will be executed from a batch script, I need the RSA key authentication to work.
How do I allow a batch script in a subdirectory on the server that contains a Mercurial repository to execute without requiring entry of a password?
You said it yourself -- you need the RSA key authentication to work. So you'll need to debug why that isn't working. The easiest way would be to see the sshd logs on the server side. It'll probably be one of
Your key isn't on the server
The ~/.ssh directory or its contents' permissions on the server are wrong
The SSH daemon on the server doesn't allow passwordless access
It's not actually asking for a password at all; it's asking for a passphrase for your key
I've noticed that cloning repo via ssh is much slower than through http regardless if it is from my own servers or BitBucket. Much in my case equals to 10 seconds from http vs. more than 2 minutes with ssh on the same BitBucket repository.
I'm using Mercurial on Windows (TortoiseHg 1.5, Mercurial 1.7). Both tests were done from GUI as well as from CLI.
Is it a common "issue" or I'm doing something wrong?
Have you turned on ssh compression in your ssh client?? It's on by default in HTTP, but it's off by default in ssh it's a setting that ssh and not mercurial controls.
http://confluence.atlassian.com/display/BITBUCKET/Using+SSH+to+Access+your+Bitbucket+Repository#UsingSSHtoAccessyourBitbucketRepository-EnablingCompression
Usually Mercurial ssh access is faster than http -- it is for me anyway.
I find that on a LAN things are faster without compression (compression takes more time than xfer) and on a WAN it's the reverse.
I have seen the same.
At first, I had a RHEL4/RHEL5 ssh issue, that prohibited compression to be negotiated - but that's fixed now (configuration tweaks). Unfortunately, I still see a factor of ~3 in cloning a repo (http vs. ssh).
I used "ssh = ssh -C -v" to see the compression ratio.
I'm using Linux, and I see this when cloning a large repo (180M+) - over a WAN (Europe <-> India/Asia).