I would like clarification on:
- how jenkins master nodes and worker nodes communicate with git
- how both use credentials and ssh plugins to authenticate with git
- when to use Credentials plugin vs SSHAgent plugin
Right now, I believe that the Master Node stores all credentials and then
passes these credentials to the worker agents. This makes me believe that
only one node - the master node - should have ssh keys for git.
Thus far this seems to be true because, when a build is trigged on master,
the worker node is able to run git clone and git init even though no ssh
keys are configured on worker agent.
So why then does this step:
steps{
sh('git remote -v')
sh('git show-ref')
sh('git tag -a $BRANCH_NAME.$BUILD_NUMBER -m "git sha is
$GIT_COMMIT"')
sh('git push origin HEAD:development --tags')
}
result in this error:
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Deploy-Staging)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] sh
[K-Front_feature-jenkinsfile-KHCSHNIRHLZUOTSCIQPWI7] Running shell script
+ git remote -v
origin https://github.com/WaterBottleInc/Reactjs-Front.git
<https://github.com/GashiandKinks/GK-Front.git> (fetch)
origin https://github.com/ <https://github.com/GashiandKinks/GK-Front.git>
WaterBottleInc <https://github.com/GashiandKinks/GK-Front.git>/Reactjs.git
(push)
[Pipeline] sh
[K-Front_feature-jenkinsfile-KHCSHNIRHLZUOTSCIQPWI7] Running shell script
+ git show-ref
a12ea59545db96fc8681dbdd5d44923108c01b40 refs/remotes/origin/feature-
jenkinsfile
[Pipeline] sh
[K-Front_feature-jenkinsfile-KHCSHNIRHLZUOTSCIQPWI7] Running shell script
+ git tag -a feature-jenkinsfile.24 -m git sha is
a12ea59545db96fc8681dbdd5d44923108c01b40
[Pipeline] sh
[K-Front_feature-jenkinsfile-KHCSHNIRHLZUOTSCIQPWI7] Running shell script
+ git push origin HEAD:development --tags
fatal: could not read Username for 'https://github.com': No such device or
address
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
this line from the error print out above:
fatal: could not read Username for 'https://github.com': No such device or
address
completely throws me off because I have no idea where it is looking for a
username.
Can someone please help me out? Thanks.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/84aa7382-8da1-423a-bbdc-3e8cc0b156cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.