I don't understand the problem of the decrypted key not matching with the public key
I think my poor choice of words might have caused some confusion, what I meant was when converting an openssh formatted private key to PEM or Base64 PKCS#8 encoded format, the private key generated when used to connect to the server(github.com) returns git@github.com: Permission denied (publickey).
which I think is caused due the rejection of this key because the key generated is not a valid or is being altered in the process of decryption or altered in the process while converting into a new File Format (PEM)[Higly likely] thus not forming an invalid keypair with the public key on the server.
getSSHExecutable
method 's scope is limited/package-private need to make it pulblic, specific to windows usecase.
java.lang.NoSuchMethodError: No such DSL method 'GitUsernamePassword' found among steps
it seems like the binding is not present, I encountered similar issue with the forked git-plugin as well, I have been working on this the whole day, I couldn't figure it out it, although when I checkout out to revision 2b5cfd1d0939a97f20c248d096f5ceeb7f76512f
in my forked-git-plugin the binding is working.$ git checkout master
$ git pull --all
$ git merge upstream/master
$ git push origin
a707434c10bdfedcd87e7c9ca2341f1182709de1
(upstream/master in my repository)$ mvn clean -Dtest=GitUsernamePasswordBindingTest test
origin/master
and upstream/master
in sync so that I can refer to 'master' in diff and have it match the upstream repository. I know others who are more rigorous and they don't bother keeping origin/master
in sync with upstream/master
, they just remember to diff against upstream/master
GitUsernamePassword
to gitUsernamePassword
with an extra symbol at the same location for GitUsernamePassword
. However, I haven't done the experiments to see the impact of changing from @Symbol("GitUsernamePassword")
to @Symbol(["gitUsernamePassword", "GitUsernamePassword"])
As far as I know, it is something that only you are encountering. You may need to merge the upstream master branch into your local master branch and then push your local branch to your origin repository. Steps that I usually take include:
$ git checkout master $ git pull --all $ git merge upstream/master $ git push origin
@MarkEWaite , After doing some investigation over this from my side, I don't think the issue that I encounter as described earlier, was related to this. The problem in my case was
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.20</version>
<relativePath />
</parent>
Changing the version to 19 solved it, now I am curious what is causing this, according to me it is just used to specify values which are not defiend in the pom.xml of the git-plugin. If so then it needs some more work on what is causing this.
Also I am a bit confused on why only this issue is encountered by me. Do I need to install some specific dependencies or other changes in my IDE/pom.xml.
@MarkEWaite , @justinharringa:matrix.org , @rishabhBudhouliya , I have created a PR for the ssh binding, please note the ssh binding does not work with RSA encrypted keys in Openssh private key/RFC4716 format I outputs this error
sign_and_send_pubkey: signing failed: error in libcrypto
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
also dsa encrypted openssh formatted key is not support by sshj library, not our issue.
I would suggest to test with encrypted RSA key openssh formatted, and let me know if you figure out something as well.
Hi everyone, we're using the git plugin for a multibranch pipeline on github.
This setup uses 'mycredentials' stored in jenkins, and works fine. However, when calling gradle release, to push a new tag, we got this error:
Exception occurred during push: [...] not authorized
We fixed it by using a "withcredentials" block (see below), which uses the same credentials as the git-plugin. But I was wondering if the git plugin makes these variables available as environment variables by default? Or if there's another 'cleaner' way to do this? They're the same credentials, used for the same purpose, so it feels weird to define them twice.
stage('Release') {
withCredentials([usernamePassword(
credentialsId: 'mycredentials',
passwordVariable: 'GIT_PASSWORD',
usernameVariable: 'GIT_USER')]) {
sh './gradlew release -Prelease.customUsername=${GIT_USER} -Prelease.customPassword=${GIT_PASSWORD} -x test'
}
}
getCredentials
method to get the credentials by ID, using them as is, with no custom decryption logic