2016-10-21 8 views
0

に失敗してビルドできない私はジェンキンスでプロジェクトを作成し、リポジトリのURLを追加し、保存して構築しようとしたと、次のエラーを得た:のBitbucketリポジトリはジェンキンス

Started by user Ayotunde Salako 
Building in workspace /var/lib/jenkins/workspace/project 
> git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> git config remote.origin.url   https://user:[email protected]/company/repo.git # timeout=10 
Fetching upstream changes from  https://user:[email protected]/company/repo.git 
> git --version # timeout=10 
> git fetch --tags --progress  https://user:[email protected]/company/repo.git  +refs/heads/*:refs/remotes/origin/* 
ERROR: Error fetching remote repo 'origin' 
hudson.plugins.git.GitException: Failed to fetch from  https://[email protected]/companyhttps://[email protected]/company/repo.gitids/repo.git 
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797) 
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051) 
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082) 
at hudson.scm.SCM.checkout(SCM.java:495) 
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) 
at  hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) 
at  jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
at  hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
at hudson.model.Run.execute(Run.java:1720) 
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
at hudson.model.ResourceController.execute(ResourceController.java:98) 
at hudson.model.Executor.run(Executor.java:401) 
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags  --progress https://[email protected]/company/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: 
stdout: 
stderr: remote: Invalid username or password. If you log in via a  third party service you must ensure you have an account password set in  your account profile. 
fatal: Authentication failed for  'https://[email protected]/company/repo.git/' 

at  org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImp l.java:1752) 
at  org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials (CliGitAPIImpl.java:1495) 
at  org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.jav a:64) 
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315) 
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795) 
... 11 more 
ERROR: null 
Finished: FAILURE 

してください、私が間違って何をやっていますか? JenkinsはCentOSサーバーにインストールされました。

+0

を助けることを願っていますが、PHPに関連するこの質問ですか? Btw ..はエラーメッセージではありません:_ "'https://[email protected]/company/repo.git/'の認証に失敗しました。" –

+0

私はユーザー、会社、そしてリポジトリを隠しました。私は正しい資格情報を入力し、まだエラーを取得します。これはJenkinsのソースコード管理セクションで入力したURLです。https:// user:[email protected]/company/repo.git Jenkinsがリポジトリをクローンできなかったため、ビルドに失敗しました。 – DabHands

答えて

0

私たちはGitリポジトリをホストするためにBitbucketを使用しています。

すべてのJenkinsジョブをssh URL(http + user/passwordではなく)で設定しました。 私のすべてのスレーブは同じsshキーを使用しています。私はすべてのBitbucketプロジェクトでこのキーを宣言しました。

useful link BitbucketクラウドにSSHを設定する。

このメソッドを使用して、Jenkinsでリポジトリを複製することをお勧めします。

あなたはHTTPSのURLを使用したい場合は、ここにsolutionです:

私はそれがどのように:)

関連する問題