> git ls-remote g...@bitbucket.org:group/repo.git # edited, of course ERROR: [Wed Apr 24 16:58:41 UTC 2019] Could not update folder level actions from source 73a4292e-,,,, hudson.plugins.git.GitException: Command "git ls-remote g...@bitbucket.org:group/repo.git" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository.
--TIA,
Randall
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cf306a8d-14c2-4ebc-9173-3ddeab0a1020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wed, Apr 24, 2019 at 11:09 AM Randall Becker wrote:This is a new situation that I have encountered after a clean install of 2.164. Attempting to use an SSH keypair (with passphrase) to talk to BitBucket.org, in a Multibranch Pipeline job. The key is properly configured as an Private Key (entered manually) with a Passphrase.When I hit Scan Multibranch Pipeline Now, Jenkins immediately prompts the JVM's stderr for the passphrase. As an example:Enter passphrase for key '/tmp/ssh6766884284790436436.key':I also get an error in the Multibranch scan log:> git ls-remote g...@bitbucket.org:group/repo.git # edited, of course ERROR: [Wed Apr 24 16:58:41 UTC 2019] Could not update folder level actions from source 73a4292e-,,,, hudson.plugins.git.GitException: Command "git ls-remote g...@bitbucket.org:group/repo.git" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository.This is bizarre. I'm running Ubuntu 16.04 using the default JRE. This did not happen on earlier versions of Jenkins that were running in Docker images - I had to remove Docker for VPN reasons.I'm basically off the air at this point. Did I just miss a plugin or do something silly?Command line git uses ssh for communications with git servers through the secure shell protocol. The ssh command is designed to prompt the user for the passphrase. The ssh command prompts for a passphrase in cases that are sometimes surprising (at least for the git plugin). You probably have one of those cases.I would guess that your Jenkins server process (the Java process running the master) is attached to a controlling terminal or it has environment variables set which make the ssh command line process believe that it is attached to a controlling terminal. That causes the ssh command line to prompt for the passphrase on the private key.Refer to https://github.com/jenkinsci/git-client-plugin/commit/882ecdfb53d627eeeea130720685681ce2553193 for the commit message that describes the change that was made in the git client plugin to handle that case, and the property you can set to enable that change.Alternatives you can choose:
- Run Jenkins without a controlling terminal (for example, if running in Docker, be sure that you "detach")
- Use private keys without passphrases
- Set the Java property org.jenkinsci.plugins.gitclient.CliGitAPIImpl.useSETSID=true on the command line that starts the master
I suspect that the critical difference between your prior condition and the current condition is that the Jenkins process is now attached to a controlling terminal.Mark Waite--TIA,
Randall
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cf306a8d-14c2-4ebc-9173-3ddeab0a1020%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Thanks!Mark Waite
Thanks, however, I'm not sure this is it. My startup script is:unset TERM # Not really usefulnohup java \
-Dorg.jenkinsci.plugins.gitclient.CliGitAPIImpl.useSETSID=true \
-jar jenkins.war \
< /dev/null 2>&1 \
> jenkins.log &which should not be attached to a terminal, but is. The define seems to have no effect. There are no SSH variables in the environment. And, most importantly, I cannot use a passphrase-less keypair to talk to bitbucket.org without being fired. Did I miss something?
On Wednesday, April 24, 2019 at 1:08:48 PM UTC-4, Randall Becker wrote:This is a new situation that I have encountered after a clean install of 2.164. Attempting to use an SSH keypair (with passphrase) to talk to BitBucket.org, in a Multibranch Pipeline job. The key is properly configured as an Private Key (entered manually) with a Passphrase.When I hit Scan Multibranch Pipeline Now, Jenkins immediately prompts the JVM's stderr for the passphrase. As an example:Enter passphrase for key '/tmp/ssh6766884284790436436.key':I also get an error in the Multibranch scan log:> git ls-remote g...@bitbucket.org:group/repo.git # edited, of course ERROR: [Wed Apr 24 16:58:41 UTC 2019] Could not update folder level actions from source 73a4292e-,,,, hudson.plugins.git.GitException: Command "git ls-remote g...@bitbucket.org:group/repo.git" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository.This is bizarre. I'm running Ubuntu 16.04 using the default JRE. This did not happen on earlier versions of Jenkins that were running in Docker images - I had to remove Docker for VPN reasons.I'm basically off the air at this point. Did I just miss a plugin or do something silly?TIA,
Randall
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8c70123f-5388-48cc-a6b8-dcca6d36fb00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'll bite. How can I use JGit instead of git in Jenkins? I thought it was hard-burnt into the Git Plugin.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/30f56e57-d3de-4e43-96dc-d07aa4ebdcda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> /usr/local/bin/jgit --version # timeout=10 > /usr/local/bin/jgit ls-remote --symref g...@Bitbucket.org:nonstop-git/nsgit.git # timeout=10ERROR: [Wed Apr 24 18:23:01 UTC 2019] Could not update folder level actions from source 0819144a... hudson.plugins.git.GitException: Command "/usr/local/bin/jgit ls-remote --symref g...@Bitbucket.org:group/repo.git" returned status code 1: stdout: stderr: fatal: "--symref" is not a valid option
On Wed, Apr 24, 2019 at 12:10 PM Randall Becker wrote:I'll bite. How can I use JGit instead of git in Jenkins? I thought it was hard-burnt into the Git Plugin.In the "Global Tools Configuration" page of "Manage Jenkins", use the "Git" button and the "Add" button under it to add "jgit" as an implementation. Once you've done that, then jobs will have an additional option to select which git implementation they will use.
On Wednesday, April 24, 2019 at 1:08:48 PM UTC-4, Randall Becker wrote:--This is a new situation that I have encountered after a clean install of 2.164. Attempting to use an SSH keypair (with passphrase) to talk to BitBucket.org, in a Multibranch Pipeline job. The key is properly configured as an Private Key (entered manually) with a Passphrase.When I hit Scan Multibranch Pipeline Now, Jenkins immediately prompts the JVM's stderr for the passphrase. As an example:Enter passphrase for key '/tmp/ssh6766884284790436436.key':I also get an error in the Multibranch scan log:> git ls-remote g...@bitbucket.org:group/repo.git # edited, of course ERROR: [Wed Apr 24 16:58:41 UTC 2019] Could not update folder level actions from source 73a4292e-,,,, hudson.plugins.git.GitException: Command "git ls-remote g...@bitbucket.org:group/repo.git" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository.This is bizarre. I'm running Ubuntu 16.04 using the default JRE. This did not happen on earlier versions of Jenkins that were running in Docker images - I had to remove Docker for VPN reasons.I'm basically off the air at this point. Did I just miss a plugin or do something silly?TIA,
Randall
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/30f56e57-d3de-4e43-96dc-d07aa4ebdcda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Thanks!Mark Waite
The Multibranch Pipeline Plugin using JGit ends up incompatible.> /usr/local/bin/jgit --version # timeout=10 > /usr/local/bin/jgit ls-remote --symref g...@Bitbucket.org:nonstop-git/nsgit.git # timeout=10ERROR: [Wed Apr 24 18:23:01 UTC 2019] Could not update folder level actions from source 0819144a... hudson.plugins.git.GitException: Command "/usr/local/bin/jgit ls-remote --symref g...@Bitbucket.org:group/repo.git" returned status code 1: stdout: stderr: fatal: "--symref" is not a valid option
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f475e8c0-ab7a-421b-9bcd-95a85ecb8c67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I should qualify... the passphrase prompt disappeared when setsid is used, but that still does not allow a passphrase-less keypair.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/69755a15-a748-49e6-bb95-a9347afa75cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/69755a15-a748-49e6-bb95-a9347afa75cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Thanks!Mark Waite
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d54ac82a-1a1d-4b40-968a-d2357addac6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I've been using 2.164.1 and 2.164.2 since their release with both Java 8 and Java 11, alternating between various configurations, I'm confident the update is not DOA.I use bitbucket repositories that are secured with passphrase protected private keys. I use GitHub repositories that are secured with passphrase protected private keys. Check your configuration carefully. Has the passphrase protected private key been disabled in bitbucket? Is Jenkins reporting any issue with the private key format?
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d54ac82a-1a1d-4b40-968a-d2357addac6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Thanks!Mark Waite
My docker image is doing fine, but the standalone Jenkins just won't authenticate with either JGit or git. It would be really nice to be able to do this without docker. Is there a standard launch recipe for my situation (in Ubuntu) or is SSH with passphrases just not available anymore?
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c4fc1bf8-31ec-4b3c-a1e7-3ae00994a047%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wed, Apr 24, 2019 at 4:27 PM Randall Becker wrote:My docker image is doing fine, but the standalone Jenkins just won't authenticate with either JGit or git. It would be really nice to be able to do this without docker. Is there a standard launch recipe for my situation (in Ubuntu) or is SSH with passphrases just not available anymore?If ssh with passphrases is not available anymore, that is a catastrophic bug. I'm reasonably confident that ssh with passphrases continues to be available. However, I won't be able to configure the test setup until later this evening. My Ubuntu 16 machine is busy right now running a Docker image that would conflict with the native package install.
On Wed, Apr 24, 2019 at 4:54 PM Mark Waite wrote:On Wed, Apr 24, 2019 at 4:27 PM Randall Becker wrote:My docker image is doing fine, but the standalone Jenkins just won't authenticate with either JGit or git. It would be really nice to be able to do this without docker. Is there a standard launch recipe for my situation (in Ubuntu) or is SSH with passphrases just not available anymore?If ssh with passphrases is not available anymore, that is a catastrophic bug. I'm reasonably confident that ssh with passphrases continues to be available. However, I won't be able to configure the test setup until later this evening. My Ubuntu 16 machine is busy right now running a Docker image that would conflict with the native package install.I can't duplicate the problem you're seeing. Steps I took while attempting to duplicate the problem included:
- Create a passphrase protected RSA private key (no special characters in the passphrase, since the git client plugin is known to have issues with special characters in the passphrase)
- Register the public key of that passphrase protected RSA key with my account on bitbucket.org
- Update ~/.ssh/config so that ssh access to the bitbucket repository from my account 'mwaite' will use the newly created passphrase protected RSA private key
- Confirm that git clone from bitbucket.org prompts for the passphrase for that private key and fails if I do not provide that passphrase
- Confirm that git clone from bitbucket.org prompts for the passphrase for that private key and succeeds when I provide the correct passphrase
- Install Jenkins 2.164.2 on a fully patched Ubuntu 16.04 machine using the instructions from https://jenkins.io/doc/book/installing/#debianubuntu. I installed the recommended plugins from the installation wizard and made no other configuration changes (this installs and runs as the user 'jenkins', not the user 'mwaite')
- Define a Jenkins credential using the passphrase protected RSA private key