Hi,
I looks like it was some system configuration issue. 
I had created set of vms on my laptop just for this work to avoid having 
the standard test instance unavailable, so it hadn't been working before. 
The vm running the controller for my scratch instance had been able to do 
checkouts and the agent vm should have been identical, so I don't know 
where the problem came from. I tried the command you suggested but that 
didn't help, but after applying my updated plugins to my preexisting test 
instance that was able to do checkout successfully.

Thanks for looking at this.

On Monday, 13 June 2022 at 16:04:43 UTC+1 [email protected] wrote:

> HI James
>
> Have your test setup works ok before you introduced vault (ie with the 
> standard credential helper?).
>
> I would hazard a guess that your git installation was installed and 
> configured to use a credential helper.
>     git config --system --unset credential.helper
>
> Regards
>
> /James
>
>
> On Monday, June 13, 2022 at 3:40:33 PM UTC+1 [email protected] 
> wrote:
>
>> Hello,
>> I’m trying to update the hashicorp-vault-plugin 
>> <https://github.com/jenkinsci/hashicorp-vault-plugin> to use credential 
>> snapshots to prevent access from agents but doing scm checkouts with ssh 
>> keys and the command line git aren't working correctly and I can't tell 
>> why. You can look at the vault pr 
>> <https://github.com/jenkinsci/hashicorp-vault-plugin/pull/218> and the ssh 
>> plugin pr <https://github.com/jenkinsci/ssh-credentials-plugin/pull/127> 
>> to see the change being made. 
>>
>>
>> For some reason the git executable is not getting the key passphrase, 
>> despite it being put in a txt file in the workspace@tmp dir on the agent, 
>> and git will instead ask for the passphrase in the terminal where I 
>> launched the agent. JGit is able to get the passphrase and run a checkout 
>> successfully. 
>>
>> I have included debug details below, can anyone provide guidance on how 
>> to fix this or next steps for further investigation?
>>
>>
>>
>> Adding some debugging the following env variables are set when git is 
>> called:
>>
>> DISPLAY=:
>>
>> GIT_ASKPASS=echo
>>
>>
>> GIT_SSH=/var/tmp/workspace/test-vault@tmp/jenkins-gitclient-ssh17057598793954356813.sh-copy
>>
>> GIT_SSH_VARIANT=ssh
>>
>> GIT_TERMINAL_PROMPT=false
>>
>>
>> SSH_ASKPASS=/var/tmp/workspace/test-vault@tmp/jenkins-gitclient-pass11065529797750620112.sh
>>
>>
>>
>> Versions:
>>
>> Jenkins: 2.354
>>
>> Pipeline: SCM step 400.v6b_89a_1317c9a_
>>
>> SSH Agent 295.v9ca_a_1c7cc3a_a_
>>
>> Git client 3.11.0
>>
>> Git 4.11.3
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/eceb1925-b260-45a9-aff0-40b0275b9746n%40googlegroups.com.

Reply via email to