Jenkins git-client:如何在windows上移动到jgit [英] Jenkins git-client: how to move to jgit on windows

查看:117
本文介绍了Jenkins git-client:如何在windows上移动到jgit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Jenkins git-client 插件移至使用 jgit ,因此配置方面存在很多问题我所看到的所有解决方案都只涉及到使用旧的git命令行,因为大多数安装现在大部分的安装都是为了让它在大多数情况下都能正常工作。

我们在同一条船上,但git命令行在Windows下依然非常不可靠。我们喜欢在新的 git-client 中使用 jgit 的想法,并且希望看看它是否实际上让事情变得更好但是我找不到一个关于如何移动到 jgit 的文档。

仅供参考我已经知道

-Dorg.jenkinsci.plugins.gitclient.Git.useCLI = false



-Dorg.jenkinsci.plugins.gitclient.Git.useJGit = true

我在寻找的是如何为ssh,email / user info等配置jgit。

等待更好的文档(比用户指南更完整,并且 forums ),我会依靠:

org.eclipse.jgit.test / tst / org / eclipse / jgit

您会发现 tons 的测试,说明JGit应该如何使用。例如,电子邮件是从配置中读取的文件我n tst.org.eclipse.jgit.lib.ConfigTest

  authorName = localConfig.get(UserConfig.KEY).getAuthorName(); 
authorEmail = localConfig.get(UserConfig.KEY).getAuthorEmail();


  • 另一个例子是SSH,读取其配置文件
    $ $ p $ $ p> config(Host orcz\\\
    +\tHostName repo.or.cz\\\
    +\tPort 2222\\\

    +\ tUser jex \\\
    +\tIdentityFile .ssh / id_jex\\\

    +\ tForwardX11 no \\\
    );
    最终主机h = osc.lookup(orcz);




  • 等等...






    您最近也有(2013年8月) JGit cookbook ,由 centic 创建( Dominik Stadler



    抓住它



    pre $ g $ git clone git: $ p>

    构建它并创建Eclipse项目文件



      mvn dependency:sources eclipse :eclipse包



    运行它




    将项目导入Eclipse工作区并在那里执行片段。

    这本食谱已经更新为JGit 3.0.3


    Since the Jenkins git-client plugin moved to use jgit, there have been a lot of issues with configuration and all of the solutions I have seen involve just switching back to using the old git command line since most installations by now have most of the hacks in place to make it work most of the time.

    We are in the same boat, but the git command line is still very unreliable under Windows. We like the idea of using jgit under the hood in the new git-client, and would like to see if it actually makes things better. But I cannot find a single ounce of documentation on how to move to jgit.

    FYI I already know about -Dorg.jenkinsci.plugins.gitclient.Git.useCLI=false and -Dorg.jenkinsci.plugins.gitclient.Git.useJGit=true What I'm looking for is how to configure jgit for ssh, email/user info, etc.

    解决方案

    Pending a better documentation (more complete than the user guide, and forums), I would rely on:

    org.eclipse.jgit.test/tst/org/eclipse/jgit:

    You will find tons of tests, illustrating how JGit is supposed to be used.

    And so on...


    You also have the recent (August 2013) JGit cookbook, created by centic (Dominik Stadler)

    Grab it

    git clone git://github.com/centic9/jgit-cookbook
    

    Build it and create Eclipse project files

    mvn dependency:sources eclipse:eclipse package
    

    Run it

    Import the project into an Eclipse workspace and execute the snippets there.

    This cookbook has been updated to JGit 3.0.3.

    这篇关于Jenkins git-client:如何在windows上移动到jgit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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