git credential approve does not work for Jenkins pipeline
up vote
0
down vote
favorite
In my Jenkins pipeline I have following code:
stage('pushing')
steps
withCredentials([usernamePassword(credentialsId: '91f32d3c-b7ee-49ac-b233-3bd93d2696eb', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')])
sh("echo -e 'url=https://domain.tldnusername=$GIT_USERNAMEnpassword=$GIT_PASSWORD'
The output looks as follows:
[Pipeline] sh
13:28:52 [git-push-tag] Running shell script
13:28:52 + git push --tags
13:28:52 fatal: Authentication failed for 'https://domain.tld/scm/~user/git-push-app.git/'
I have already prepared environment with minimal configuration:
git config --global user.name jenkins
git config --global user.email jenkins@domain.tld
git config --global credential.helper cache
git config --global push.default simple
With the above configuration git credential approve and git push --tags from command line works for me. But that does not work in Jenkins pipeline.
I don't have any idea why.
git jenkins jenkins-pipeline credentials
add a comment |
up vote
0
down vote
favorite
In my Jenkins pipeline I have following code:
stage('pushing')
steps
withCredentials([usernamePassword(credentialsId: '91f32d3c-b7ee-49ac-b233-3bd93d2696eb', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')])
sh("echo -e 'url=https://domain.tldnusername=$GIT_USERNAMEnpassword=$GIT_PASSWORD'
The output looks as follows:
[Pipeline] sh
13:28:52 [git-push-tag] Running shell script
13:28:52 + git push --tags
13:28:52 fatal: Authentication failed for 'https://domain.tld/scm/~user/git-push-app.git/'
I have already prepared environment with minimal configuration:
git config --global user.name jenkins
git config --global user.email jenkins@domain.tld
git config --global credential.helper cache
git config --global push.default simple
With the above configuration git credential approve and git push --tags from command line works for me. But that does not work in Jenkins pipeline.
I don't have any idea why.
git jenkins jenkins-pipeline credentials
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
In my Jenkins pipeline I have following code:
stage('pushing')
steps
withCredentials([usernamePassword(credentialsId: '91f32d3c-b7ee-49ac-b233-3bd93d2696eb', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')])
sh("echo -e 'url=https://domain.tldnusername=$GIT_USERNAMEnpassword=$GIT_PASSWORD'
The output looks as follows:
[Pipeline] sh
13:28:52 [git-push-tag] Running shell script
13:28:52 + git push --tags
13:28:52 fatal: Authentication failed for 'https://domain.tld/scm/~user/git-push-app.git/'
I have already prepared environment with minimal configuration:
git config --global user.name jenkins
git config --global user.email jenkins@domain.tld
git config --global credential.helper cache
git config --global push.default simple
With the above configuration git credential approve and git push --tags from command line works for me. But that does not work in Jenkins pipeline.
I don't have any idea why.
git jenkins jenkins-pipeline credentials
In my Jenkins pipeline I have following code:
stage('pushing')
steps
withCredentials([usernamePassword(credentialsId: '91f32d3c-b7ee-49ac-b233-3bd93d2696eb', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')])
sh("echo -e 'url=https://domain.tldnusername=$GIT_USERNAMEnpassword=$GIT_PASSWORD'
The output looks as follows:
[Pipeline] sh
13:28:52 [git-push-tag] Running shell script
13:28:52 + git push --tags
13:28:52 fatal: Authentication failed for 'https://domain.tld/scm/~user/git-push-app.git/'
I have already prepared environment with minimal configuration:
git config --global user.name jenkins
git config --global user.email jenkins@domain.tld
git config --global credential.helper cache
git config --global push.default simple
With the above configuration git credential approve and git push --tags from command line works for me. But that does not work in Jenkins pipeline.
I don't have any idea why.
git jenkins jenkins-pipeline credentials
git jenkins jenkins-pipeline credentials
edited 2 days ago
Vadim Kotov
4,23353247
4,23353247
asked Nov 8 at 14:15
piecia
285
285
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53209567%2fgit-credential-approve-does-not-work-for-jenkins-pipeline%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password