使用 Hudson 配置 GIT
我对 HUDSON 和 GIT 很天真,我遵循了一些教程并尝试配置 hudson 和 git。
到目前为止我已经完成的设置,
- 设置 git 可执行文件的路径
- 使用 mysysgit UI 创建了一个空的本地存储库。
- 创建一个新的工作,用git作为源代码管理,
- 存储库 URL:
file:///c:/GitShare/Test/MyRepo
- 分支说明符:
master
- 存储库 URL:
- 保存文件并运行构建
我得到以下内容错误:
Started by user anonymous
Checkout:workspace / C:\Hudson\jobs\Test1\workspace - hudson.remoting.LocalChannel@1ed8c3
Using strategy: Default
Checkout:workspace / C:\Hudson\jobs\Test1\workspace - hudson.remoting.LocalChannel@1ed8c3
Fetching changes from the remote Git repository
Fetching upstream changes from file:///c:/GitShare/Test/MyRepo
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: C:\Git\bin fetch -t file:///c:/GitShare/Test/MyRepo +refs/heads/*:refs/remotes/origin/*
Cannot run program "C:\Git\bin" (in directory "C:\Hudson\jobs\Test1\workspace"): CreateProcess error=5, Access is denied
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:824)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:782)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:782)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:568)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1367)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
更新
感谢您的回复,我已经向用户授予了所有权限,并指定了路径,即“C:\Git\bin\git.exe”..在解决之后我能够通过以下方式连接到本地存储库Hudson,但是当我尝试连接到另一个本地存储库时,出现以下错误。
由用户匿名发起 签出:工作区 / C:\Hudson\jobs\Job1\workspace - hudson.remoting.LocalChannel@84a6c0 使用策略:默认 签出:工作区 / C:\Hudson\jobs\Job1\workspace - hudson.remoting.LocalChannel@84a6c0 从远程 Git 存储库获取更改 从 git://160.110.149.132/GIT_Repo 获取上游更改 错误:无事可做 [DEBUG] 跳过构建的监视依赖项更新:Job1 #3,因为结果:失败 已完成:失败
我猜存储库未正确初始化,您能否告诉我创建本地存储库并公开发布它的步骤。
我创建存储库时遵循的步骤: 1.打开Git Bash Shell, 2.导航到要发布项目的repo文件夹,然后输入“git init”命令。
问题 2:
如果我的存储库位于“c:/GitShare/Repo”。 此“Repo”文件夹包含“.git”和项目(待发布)文件夹。
那么存储库的 URL 是什么?
I am naive to HUDSON and GIT, i followed some tutorials and tried to configure hudson and git.
Settings that i have done till now,
- Set the path to git executable
- created a empty local repository using mysysgit UI.
- create a new job with git as source code management,
- URL of Repository:
file:///c:/GitShare/Test/MyRepo
- Branch Specifier :
master
- URL of Repository:
- save the file and run the build
I got the following error:
Started by user anonymous
Checkout:workspace / C:\Hudson\jobs\Test1\workspace - hudson.remoting.LocalChannel@1ed8c3
Using strategy: Default
Checkout:workspace / C:\Hudson\jobs\Test1\workspace - hudson.remoting.LocalChannel@1ed8c3
Fetching changes from the remote Git repository
Fetching upstream changes from file:///c:/GitShare/Test/MyRepo
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: C:\Git\bin fetch -t file:///c:/GitShare/Test/MyRepo +refs/heads/*:refs/remotes/origin/*
Cannot run program "C:\Git\bin" (in directory "C:\Hudson\jobs\Test1\workspace"): CreateProcess error=5, Access is denied
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:824)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:782)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:782)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:568)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1367)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
UPDATE
thanks for replying, i had already given all the permission to user, and had specified the path i.e. "C:\Git\bin\git.exe".. after working around i am able to connect to a local repository through Hudson but when i tried to connect to another local repository i am getting the following error.
Started by user anonymous
Checkout:workspace / C:\Hudson\jobs\Job1\workspace - hudson.remoting.LocalChannel@84a6c0
Using strategy: Default
Checkout:workspace / C:\Hudson\jobs\Job1\workspace - hudson.remoting.LocalChannel@84a6c0
Fetching changes from the remote Git repository
Fetching upstream changes from git://160.110.149.132/GIT_Repo
ERROR: Nothing to do
[DEBUG] Skipping watched dependency update for build: Job1 #3 due to result: FAILURE
Finished: FAILURE
I guess repository is not initialized properly, can you please tell me the steps to create local repository and to publish it publicly.
Steps i have followed to create a repository:
1. open Git Bash Shell,
2. navigate to the repo folder which is having project to be published, and typed "git init" command.
Question 2:
if my repository is located on "c:/GitShare/Repo".
This "Repo" folder contains a ".git" and Project(to be published) folders.
Than what will be URL for the repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定您的路径和权限设置正确吗?
C:/Git/bin
(这只是它所在的文件夹) 。Are you sure that you have your paths and permissions set correctly?
C:/Git/bin
(which is just the folder it's in).