I'm using Jenkins 2 and trying to execute below GIT command using 'Execute Shell' in Build section.
git config --global user.email $GITHUB_LOGIN git config --global user.name $GITHUB_LOGIN
git tag -a $BUILD_NUMBER -m "Version $BUILD_NUMBER" git push origin --tags
With this, I'm getting below error when i run the job
- git push origin --tags fatal: could not read Username for 'https://github.com': Device not configured
In the build logs, And I've observed below statement and per my understanding, I believe Jenkins is using GIT_ASKPASS to pull the changes from GitHub.
using GIT_ASKPASS to set credentials GitHubCredentials
With that said, Can someone help me understand if I can use 'GIT_ASKPASS' to fix this issue? If yes, How can i use it in my situation?
I got this resolved with the below code snippet