Skip to content

Instantly share code, notes, and snippets.

@n-shinya
Last active December 17, 2015 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n-shinya/5675834 to your computer and use it in GitHub Desktop.
Save n-shinya/5675834 to your computer and use it in GitHub Desktop.
[Jenkins]認証のかかったリポジトリをHTTPSプロトコルでcloneする

[Jenkins]認証のかかったリポジトリをHTTPSプロトコルでcloneする

たとえばbitbucketのプライベートリポジトリ。URLを入力すると認証エラーがでる・・・

Failed to connect to repository : Command "git ls-remote -h https://username@bitbucket.org/username/repo-name.git HEAD" returned status code 128:
stdout: 
stderr: fatal: Authentication failed

URLにパスワードを含めて入力

https://username:password@bitbucket.org/username/repo-name.git

うまくいくはず。

パスワードは隠せない。SSHが通る環境だったらあえてやる必要はない。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment