如何用bitbucket配置jenkins [英] How to configure jenkins with bitbucket
问题描述
我试图用Bitbucket配置Jenkins。它将近4天,但Jenkins没有使用Bitbucket进行克隆。
I am trying to configure Jenkins with Bitbucket. Its almost 4 days but Jenkins not cloning with Bitbucket.
。
Steps I am following.
- 安装jenkins。
- 安装git
- 创建了一个名为javascript
的存储库,其中包含一些HTML代码。
管理Jenkins - >配置系统 - >在(Git)选项卡 - >名称:默认,Git可执行文件路径:/ usr / bin / git。如下图所示。
- 创建一个新项目Jenkins的工作)说Hello World - > Configure->项目名称:Hello World - >描述:blalala - >源代码管理 - > git-> Repository URL: https://UserName@bitbucket.org/UserName/HelloWorld.git 。
- 凭证:提供我的凭证。
- Install jenkins.
- Install git
- I have account on bitbucket. created a repository called javascript which have some HTML code. Manage Jenkins -> Configure System ->In the (Git) tab -> name:Default, Path to Git executable:/usr/bin/git. as shown in bellow image.
- Created a new item(jobs) in Jenkins say Hello World ->Configure-> Project name:Hello World -> Description: blalala -> Source Code Management-> git-> Repository URL :https://UserName@bitbucket.org/UserName/HelloWorld.git.
- Credentials: providing my Credentials.
但我收到此错误
But I am getting this error
Failed to connect to repository : Command "/usr/bin/git config --local credential.helper store --file=/tmp/git6945256026248158269.credentials" returned status code 129:
stdout:
stderr: error: unknown option `local'
usage: git config [options]
Config file location
--global use global config file
--system use system config file
-f, --file <FILE> use given config file
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--replace-all replace all matching variables: name value [value_regex]
--add adds a new variable: name value
--unset removes a variable: name [value-regex]
--unset-all removes all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit opens an editor
--get-color <slot> find the color configured: [default]
--get-colorbool <slot>
find the color setting: [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
使用git集线器以及。尝试使用SSH,以及更多的方法。请帮助我。
Its so frustrating.tried with git hub as well. tried using ssh,and many more ways. Please Help me with this.
推荐答案
看起来您使用的是旧版本的Git,它没有 - 本地
选项。
It looks like you're using an older version of Git, which does not have the --local
option.
根据这个问题引入了 - local
选项在2010年底的v1.7.4中。
According to this question the --local
option was introduced in v1.7.4 in late 2010.
请确认您在服务器上使用的Git版本是否至少比v1.7.4更新,然后再试一次。您可以验证是否使用 git --version
或 git help config
,然后检查帮助中是否包含对 - 本地
选项。
Please verify that the version of Git you're using on the server is more recent than at least v1.7.4, then try again. You can verify that using git --version
, or git help config
, then check whether the help contains a reference to the --local
option.
这篇关于如何用bitbucket配置jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!