在Windows上使用Hudson的Git插件克隆/获取存储库问题 [英] Problem cloning / fetching repository using Git plugin for Hudson on Windows

查看:318
本文介绍了在Windows上使用Hudson的Git插件克隆/获取存储库问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我安装了Hudson,并安装了git插件。

我没有找到解决方案来解决我的问题。在Windows服务器(不是我的选择)和哈德森作为服务运行。 Git / bin 在路径上。但是我无法克隆存储库。以下是控制台输出的缩略显示:

 由用户匿名
开始Checkout:workspace / C:\ .hudson \jobs\sdf\workspace - hudson.remoting.LocalChannel@65394b
上次修正版本:修订版本74200b32314231a5efdadd87bf36b42ec145c720(原点/主控)
结帐:工作区/ C:\.hudson\ jobs \sdf\workspace - hudson.remoting.LocalChannel@65394b
从远程Git存储库获取更改
从ssh获取上游更改://git.mccannlondon.co.uk/git/mccann_admin
[workspace] $C:\ Program Files \Git\bin\git.exefetch -t ssh://git.mccannlondon.co.uk/git/mccann_admin + refs / heads / * :refs / remotes / origin / *
服务器的主机密钥没有缓存在注册表中。您
不能保证服务器是您
认为它的电脑。
服务器的rsa2密钥指纹为:
ssh-rsa 2048 f1:48:2a:0a:d9:18:cf:2e:f2:8c:b3:25:7f:34:d5:34
连接被放弃。
致命:远程端意外挂起
错误:从原点/原点获取问题 - 可能无法使用。继续无论如何

所以看起来我需要验证主机,但我不确定哈德森为什么会启动当我将管理员设置为哈德森服务的所有者时,作为匿名用户的工作。

有谁知道:


  • a)如何更改hudson的运行用户?或

  • b)使用与hudson使用的用户帐户相同的用户帐户连接到删除计算机以允许hudson获取?



如果在道歉之前发布了这条消息,但我花了好几个小时搜索并找不到任何东西。



谢谢



Lewis

解决方案

这可能与








$ b < blockquote>

问题是MSysGit在后台启动PLink,即终端实际上​​并未连接到PLink的输入。这意味着您无法在PLink中输入任何内容。



您只需使用PLink或PuTTY连接到服务器,回答是,然后就可以将不会再被询问。


tutorial from cletus a>也是有帮助的。



对这个问题的一个很好的描述可以在此博客条目


问题在于 Hudson是一项服务,在用户Local服务帐户



下一步是手动添加缓存(一个文件),因为我知道您可以在Linux中执行此操作。

错误再次,Windows没有将此缓存作为文件使用注册表。

在注册表中搜索找到了我的用户的条目(以前曾访问存储库并添加到缓存中足迹),其中跟踪存储并复制到HKEY_USERS,以便用户可以访问它。
$ b 条目如下:



 密钥名称:HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys 
课程名称:NO CLASS
上次写入时间:23.01.2009 - 18:35
值0
名称:dss @ 22:bla_bla.com
类型:REG_SZ
数据:0xb477b ...




在命令行中,您可以轻松添加密钥,如下所示:



  reg add HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys / v dss @ 22:bla_bla.com / d 0xb477b ... 




现在Hudson作为一项服务运行,快乐平稳地前往仓库代码在哪里。



Before anybody shoots me down for this - I have already checked every appropriate thread and still not found a solution to my problem.

I have Hudson with git plugin installed on windows server (not my choice) and Hudson runs as a service. Git/bin is on the path. However I cannot clone the repository. Here is a shortened display of the console output:

Started by user anonymous
Checkout:workspace / C:\.hudson\jobs\sdf\workspace - hudson.remoting.LocalChannel@65394b
Last Built Revision: Revision 74200b32314231a5efdadd87bf36b42ec145c720 (origin/master)
Checkout:workspace / C:\.hudson\jobs\sdf\workspace - hudson.remoting.LocalChannel@65394b
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://git.mccannlondon.co.uk/git/mccann_admin
[workspace] $ "C:\Program Files\Git\bin\git.exe" fetch -t ssh://git.mccannlondon.co.uk/git/mccann_admin +refs/heads/*:refs/remotes/origin/*
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 f1:48:2a:0a:d9:18:cf:2e:f2:8c:b3:25:7f:34:d5:34
Connection abandoned.
fatal: The remote end hung up unexpectedly
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway

So it seems I need to authenticate the host however I'm not sure why hudson is starting the job as user anonymous when I have set the Administrator as owner of the hudson service.

Does anyone know:

  • a) how to change hudson's run user? or
  • b) connect to the remove computer with the same user account as hudson uses as to allow hudson to fetch?

If this has been posted before apologies but I spent a good few hours searching around and couldn't find anything.

Thanks

Lewis

解决方案

This may be related to the question Git, Can’t clone repo on windows

The problem is that MSysGit starts PLink in the background, i.e. the terminal is not actually connected to the input of PLink. That means that you simply can't type anything into PLink.

You simply have to connect to the server once using PLink or PuTTY, answer Yes and from then on, you won't be asked again.

The tutorial from cletus can be helpful as well.

A good description of the issue can be found in this blog entry

the problem is that Hudson is a service and runs under the user "Local Service Account".

The next step is to add the trace manually the cache (a file) because I know you can do in Linux.
Wrong again, Windows does not have this cache as a file but uses the registry.
Searching in the register found an entry for my user (who had previously accessed the repository and added to the cache footprint) where the trace was stored and copied to HKEY_USERS so that users can access it.

The entry goes like this:

Key Name: HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys
Class Name: NO CLASS
Last Write Time: 23.01.2009 - 18:35
Value 0
Name: dss@22:bla_bla.com
Type: REG_SZ
Data: 0xb477b...

From the command line, you can easily add the key as follows:

reg add HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys /v dss@22:bla_bla.com /d 0xb477b...

Now Hudson, run as a service, go happily and smoothly to the repository where the code.

这篇关于在Windows上使用Hudson的Git插件克隆/获取存储库问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆