Search code examples
jenkinsmercurialtortoisehg

After changing Maricurial url in hgrc, jenkins stuck on pull


My repository url was changed so I updated hgrc file with new url. I also updated new url in jenkins job.

Now when I am building the job, it hangs with the following output

-----------------Console Output-------------------

Started by user user123 
Building in workspace D:\jenkins\jobs\api\workspace 
[workspace] $ "C:\Program Files\TortoiseHg\hg.exe" showconfig paths.default 
[workspace] $ "C:\Program Files\TortoiseHg\hg.exe" pull --rev branch

And it will never move forward. If i run the same command on cmd

"C:\Program Files\TortoiseHg\hg.exe" pull --rev branch

It works fine with following output

pulling from ssh://repos-url/repos-name 
no changes found

But jenkins hangs on this command. Need some help to move forward.

Thank you


Solution

  • As I mentioned in my question that I recently changed repository url. The issue was that new server's key was not cached in the registry where jenkins was hosted.

    Resolution:

    I logged in to the administrator account(same account used by jenkins) on my server through RDP and on the other side I started building the job in jenkins. When the console output came to this line

    [workspace] $ "C:\Program Files\TortoiseHg\hg.exe" pull --rev branch

    RDP window showed me an alert which was

    Putty Security Alert

    I pressed Yes and I saw jenkins console is now progressing and build was successful after that.