Upgrade Git Jenkins plugin to 2.2.7
We have a job in Jenkins that clones git repo using HTTP, and one of the steps runs git command for the same repository.
After upgrading Git Jenkins plugin to latest 2.2.7, the command line step fails with error:
fatal: could not read Username for 'http://xxx': No such device or address
When trying to run the same command from command line, git actually asks for usename.
On Linux you can use the 'cache' authentication helper that is bundled with Git 1.7.9 and higher. From the Git documentation:
This command caches credentials in memory for use by future git programs. The stored credentials never touch the disk, and are forgotten after a configurable timeout. The cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions.
Run the command below to enable credential caching. After enabling credential caching any time you enter your password it will be cached for 1 hour (3600 seconds):
git config --global credential.helper
'cache --timeout 3600'