In Jenkins (Version 2.190, earlier versions have the same issue) I created a normal pipeline that will read the Jenkins file from bitbucket repo. My URL looks like: https://<Username>@bitbucket.org/<project>/<repo>.git
In the configuration page for this project I get in big red letters:
Failed to connect to repository : Command "git ls-remote -h https://<Username>@bitbucket.org/<project>/<repo>.git HEAD" returned status code 128:
stdout:
stderr: fatal: cannot exec '/tmp/pass6563118881422685106.sh': Permission denied
fatal: could not read Password for 'https://<Username>@bitbucket.org': terminal prompts disabled.
I do add credentials for this repository by selecting a user from the drop down menu.
If I start a build for this pipeline this is the output I get:
Started by user <Username> Obtained Jenkinsfile from git https://<Username>@bitbucket.org/<project>/<repo>.git Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline[Pipeline] echoStarting the build file
Which to me looks like all is working.
If I create a multi branch pipeline however and use the same bitbucket settings:
https://<Username>@bitbucket.org/<project>/<repo>.git and the same user account from the drop down I do NOT get the big red text and the output when running the build is:
Started by user <Username> [Tue Aug 20 07:54:38 CEST 2019] Starting branch indexing... > git --version # timeout=10 using GIT_ASKPASS to set credentials > git ls-remote https://<Username>@bitbucket.org/<project>/<repo>.git # timeout=10 ERROR: [Tue Aug 20 07:54:39 CEST 2019] Could not update folder level actions from source cc400768-3570-4064-ba4a-0272fd2604fe hudson.plugins.git.GitException: Command "git ls-remote https://<Username>@bitbucket.org/<project>/<repo>.git" returned status code 128: stdout: stderr: fatal: cannot exec '/tmp/pass2735653208053218018.sh': Permission denied fatal: could not read Password for 'https://<Username>@bitbucket.org': terminal prompts disabled
Is there a difference between the handling of a single branch or a multibranch?