I have a Jenkins instance with the Mercurial plugin installed on a Windows 2008 R2 machine. I am trying to define a build job for a Maven project on my KilnHQ repository. The HG clone step fails to retrieve code due to authentication failure.
I've read Kiln documentation and they only support HTTPS. There is no SSH support. However, the Jenkin's hg plugin does not allow me to enter a username/password.
How can I successfully wake my build work through Jenkins?
With (all) http(s):// URLs it's legal to put the username and password directly in the URL. Mercurial supports that. If The Mercurial plugin for Jenkins doesn't break it then you can probably do that:
https://user:pass#kilnhost.com/path/to/repo
If that doesn't work you can probably put the authentication information in the Jenkin's user's home directory's Mercurial.ini file's [auth] section: http://www.selenic.com/mercurial/hgrc.5.html#auth
Related
I am trying to add perforce repository for bamboo. But not able to make it. Getting following error while adding repository-
I have downloaded latest bamboo 30days trial and installed on my local machine. Bamboo is installed correctly as I am able to create automated build using MSBuild with BitBucket repository.
My bamboo instance is running on http://localhost:8085.
I have Downloaded and installed latest P4D and P4V from https://www.perforce.com/downloads and installed in the same machine. Perforce server and client are correctly configured as I am able to checkin source code to server using client. Running on port 1666. By client and server are both installed in C:\Program Files\Perforce.
I have added bamboo Server Capabilities for perforce.
On providing perforce detail while adding repository, getting following three alerts from p4v client-
User id and password are correct also url with port is correct. I am able to get data from repository with this detail.
p4v.exe is already there in my PATH and also I run p4v -help on command prompt, getting following result. I dont see any option named 'info'.
p4v.exe is the GUI program for Perforce.
There is a command-line program for Perforce, called p4.exe.
When Bamboo says that it wants The location of the p4 client executable, you have to specify the path to p4.exe, not the path to p4v.exe.
When you downloaded and instlaled p4v.exe on your system, you should also have received a p4.exe (if not, download that program, too). Then specify the path to p4.exe to Bamboo.
I am using VCS checkout mode to agent side and also have defined the teamcity.hg.agent.path = c:\program files\mercurial\hg.exe in agent.properties file. Still VCS is not picking up this setting and giving me the following error:-
Test connection failed in Dev :: Stocks :: Build and Package. Cannot find mercurial executable at path 'hg'
Also have defined the path in windows environment variables. Mercurial is not installed on server machine. I have read in documentation that if you are using a agent side checkout then not required. Please guide what I am missing here.
thanks
According to the documentation, if you're using server side checkout, then you don't need to install mercurial on your agent.
But when you set up version control as a VCS root, you do need the TeamCity server to be able to talk to the mercurial server so it can do things like detect changes. The JetBrains documentation specifically says that if you're using a Mercurial VCS root:
Mercurial should be installed in the server machine, and, if
agent-side checkout is used, on the agents.
I have a Mercurial repository (on Bitbucket) with some code (Java) and I want to do CI builds on a cloud-based Jenkins server (at Jelastic, running on CentOS). My problem is that I haven't been able to do a proper installation of Mercurial on the Jenkins server.
The Jenkins build fails with the following message:
ERROR: Failed to clone https://bitbucket_jenkins_user:some_password#bitbucket.org/repo_owner/my_repository because hg could not be found; check that you've properly configured your Mercurial installation
Setup information
It's a private Mercurial repository, hosted at Bitbucket
In Bitbucket I have set up a Service to trigger the Jenkins build, after a Push has happened
I have defined a specific bitbucket jenkins user in my Mercurial repository, it has only read rights and it logs in using simple https authentication
Jenkins runs on a Tomcat 7, hosted in a Jelastic cloud environment, on CentOS 6
The Mercurial plugin was installed through the Jenkins interface, by Manage plugins
The build is configured as being triggered remotely (by the service defined in Bitbucket)
Build results are the same when started manually and when triggered from a push to the repository
When I first did this I was under the impression that installing the Mercurial plugin in Jenkins would be enough, that it would also install the needed Mercurial binaries to be able to connect to the repository and get the code. I have realized that I was wrong and that on the Manage Jenkins / Configure System page I need to specify my Mercurial installation.
Questions
Is it possible to create a Mercurial installation without ssh access and doing a "yum install mercurial"?
In the Jenkins interface, what can I specify when choosing the "Install Automatically" option?
When defining an installer, I have experimented with the "Extract zip/tar.gz" option, but what can I write as the "Download URL for binary archive"?
Jenkins also offers an installer option of "Run command". What kind of commands could that be, maybe a "yum install ..." or "rpm ..."?
Since my server is cloud based, getting ssh access is a paid add-on which I would prefer to avoid. But if that is my only option I will of course do it, thereby getting access to running commands on the server. However, running "yum install mercurial" on Centos seems to only give the 1.4 version of Mercurial. Current version when I write this is 2.6.3, would I need to download the sources and compile it myself or is it possible to get that as a binary for Centos somewhere?
The Mercurial Plugin page has a section on how to use the Auto Installation options to install Mercurial using ArchLinux packages.
"The plugin supports generic tool auto-installation methods for your Mercurial installation, though it does not publish a catalog of Mercurial versions. For users of Linux machines (with Python preinstalled), you can use ArchLinux packages. For example, in /configure under Mercurial installations, add a Mercurial installation with whatever Name you like, Executable = INSTALLATION/bin/hg, Install automatically, Run Command, Label = linux (if desired to limit this to slaves configured with the same label), Command = [ -d usr ] || wget -q -O - http://www.archlinux.org/packages/extra/i686/mercurial/download/ | xzcat | tar xvf - (or …/x86_64/… for 64-bit slaves), Tool Home = usr, and configure a job with this installation tied to a Linux slave."
see https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin
I'm really new with SCM systems, so I'm starting to study Mercurial, but I'm facing a problem that I have no idea how to fix. I hope someone can point me the right direction :-) :
So, I have installed the BitNami Redmine Stack (http://bitnami.org/stack/redmine) on a Vmware computer with windows 2003 (64 Bits) as the OS. On the same VM I have installed Mercurial-2.3 (Mercurial 2.3 Inno Setup installer - x64 Windows - does not require admin rights) , and restarted. after that , created a directory (e:\helloworld) and I have initialized the directory with some basic the HG commands (HG Init, HG Add, HG Commit).
Using the host computer to confirm the correct communication with the VMWare guest computer, I have created a small project in Redmine, added a repository with Mercurial as the SCM and included the initialized directory (e:\helloworld on the server). The repository is displayed correctly in Redmine, and, working directly in the virtual computer if I do some changes and perform some commits, the changes are displayed in the Redmine repository. From my current limited knowledge, all seems to be ok when I work directly in the VM, but when I try to clone the directory using HG clone from the host computer, the server responds:
C:\helloworld>hg clone http://redminevm/redmine/projects/helloworld
abort: HTTP Error 406: Not Acceptable
I also have tried with the IP address instead of the hostname, adding the username and the password to the URL, or initializing the local folder previous to try the hg clone. all my attemps return the same result. I'm assuming something is incorrect in the server, but I have no idea what it can be.
What should review on the server (or Client), in order to allow me to clone the Mercurial repository thru http?
Thank you very much in advance!
Alex.
Ok, after investigating, and with a big help from the Redmine forum, I can answer my own question. I hope my experience can help someone. My question was because of lack of knowledge about Redmine and what it can and cannot do.
so;even if we can have repositories in a RedMine project, RedMine is not a repository server. Means I can link a repository to a project, but, if I want work on it thru http (or serve multiples repositories) , aditionally I need install a server like rhodecode, or use hg serve. :-)
Saying this, I was doing this incorrectly. After running hg serve , I was able to serve multiples repositories.
Same error if you want to clone a git repo with "hg clone". Yeah, I know, I'm an idiot, but it happens, probably this will help someone.
I am trying to configure a task in Hudson for a VC++ project. I was able to build a project from the file system with MSBuild task. But when I try to configure the task to check out a bazaar repo to do the build, checkout is always failing in authentication. Bazaar passwordless access is setup on the machine and when I use bzr cmd line, checkout is happening without password. Another post suggested that I should have the id_rsa in C:\Documents and Settings\Administrator.hudson - but that also did not help. In Subversion config I saw a way of mentioning username and password. Is there any way to get around this problem.
I assume you have set up the authentication in the windows equivalent of ~/.bazaar/authentication.conf (use bzr version -v to get the correct location).
Is hudson running as the same user as the one you use to connect with the command-line? Because that will impact which authentication.conf it will try to use.
My hudson is using authentication.conf fine but I run it on Ubuntu.
I solved the problem. The authentication.conf is not being considered in windows. I made the repo accessible through http and configured the bazaar with that URL. It was able to download the repo with http protocol without asking for password. One more thing I did was I created a username in hudson, which I matched with a user having access in the bazaar repo which solved another problem which was asking for a user named pwd.