Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×We are having an issue where one user is getting an error when trying to commit with a valid JIRA issue. The JQL we have setup is project in myProjects(). This works for all users who have tested it except for one. The user who is having the issue is an administrator of the JIRA project, and the JIRA issue number is valid as other users are not having the same issue with the same JIRA issue number.
We are unable to see anything in the logs other than the commit is rejected.
This should work regardless of using SSH or HTTPS, as long as it's setup correctly. Are any other users using SSH with this hook?
You may want to check the repository contains the correct remote base url by running:
git remote -v
It should look similar to the ones here.
Hi Adam,
Yes we have other users that are using SSH there. He also just tried to switch to HTTPS and had the same issue with the hook. Below is log output.
https | o@1O3A096x556x4729749x0 | E731TK | 2017-02-23 09:16:36,919 | "GET /scm/rcs/rental-clients-training.git/info/refs HTTP/1.1" | "" "git/2.10.1" | 200 | 0 | 865 | refs | 433 | - |
https | o@1O3A096x556x4729751x0 | E731TK | 2017-02-23 09:16:38,179 | "POST /scm/rcs/rental-clients-training.git/git-upload-pack HTTP/1.1" | "" "git/2.10.1" | 200 | 341 | 178025 | cache:miss, clone | 909 | - |
https | o@1O3A096x559x4730353x1 | E731TK | 2017-02-23 09:19:05,598 | "GET /scm/rcs/rental-clients-training.git/info/refs HTTP/1.1" | "" "git/2.10.1" | 200 | 0 | 735 | refs | 394 | - |
https | o@1O3A096x559x4730355x1 | E731TK | 2017-02-23 09:19:08,078 | "POST /scm/rcs/rental-clients-training.git/git-receive-pack HTTP/1.1" | "" "git/2.10.1" | 200 | 495 | 366 | push, rejected | 2094 | - |
He also has no issues making commits when the require JIRA commits hook is disabled. I will check if other users on his team are using SSH but I believe others are without issues. Is there a way to enable more logging for that hook so it will output more information?
Thanks,
Trent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
Any update on this? Any way to enable extra logging to see what username is being passed to JIRA or anything like that?
Thanks,
Trent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trent,
I haven't found much. Could you get the user to reset their credentials, in particular the credentials cache for that repository. Maybe they are wrong. There are some instructions here for doing this in Git here: http://stackoverflow.com/questions/18157583/git-credential-helper-cache-never-forgets-the-password
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
So the issue is the user is using SSH keys to make the connection, and the SSH key is setup with his email address and not his JIRA ID.
If he creates a new SSH key with his JIRA ID will it work, or does this hook only work when committing with HTTPS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you get the user to run the same JQL query in the JIRA advanced search? What comes back? Also does this user have the same details like username etc in Bitbucket and JIRA?
It sounds like there is something specific about this user that is causing this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.