Closed u3shit closed 3 years ago
Small update: I can get rid of the secret by manually deleting the <gogsSecret>
line from the job's config.xml, but if I set up a new secret in the job properties afterwards, I receive the same error again.
@u3shit Will test this again, but can you send logs from Jenkins? Also you mentioned version 1.0.50 of the plugin, but i suspect this is a typo? Just reentering the secret should fix the problem so i'm very curious what the problem is. Did you upgrade everything at once? So the plugin, Gitea and Jenkins?
Um, yeah, sorry, the plugin is 1.0.15, apparently I can't copy 4 digits. I'm attaching a log (I removed one IP address from it by hand), but there's hardly any info in it. jenkins.log I reentered the secret multiple times but it didn't help. And yes, unfortunately I tend to update everything at once when I notice that my jenkins is out of date.
Can you try to downgrade the plugin first? If the problem still persist it can be something in Gitea.
I downgraded to 1.0.14, reentered the secret at the jenkins job, now it works again.
I finally figured out how to build this plugin, built the git master, installed, that worked too. Then I reinstalled the 1.0.15 release, and now it works too. I have no idea what happened here.
Okay, it looks like it works if I enter a 32 character secret (or shorter), but it produces invalid secret error if I specify a 64 character one. Is there a limit on the length of the secret?
If there is a limit it's in the library of Jenkins itself. I'm not aware of this.
I'm closing this issue as we are using the secret methods which are provided by Jenkins. If there is a limit then it's in Jenkins itself but not in this plugin.
{"result":"ERROR","message":"Incorrect secret"}
Description
After updating the plugin to 1.0.50, the webhook stopped working with "Invalid secret" error. I made sure the same secret is entered both at gitea (I created a gogs webhook there) and jenkins. When reloading the jenkins config page, the secret is replaced by
{longbase64something}
, I tried to copy that to gitea, but that also didn't work. Finally I unchecked "Use Gogs secret" in jenkins, removed the secret from gitea, but I still receive the error. In jenkins I went back to the configuration page, and the secret is back! No matter how many times do I uncheck, after a save&reload it returns...