Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pre-commit hooks in Stash 3.7.0

John Lawlor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2016

How do you configure pre-commit hooks in Stash? I get an error when I try to commit with user ids which don't match the current user id:

remote: [POLICY] - Cannot push commits from other users
remote: [POLICY] - Current user is: phealy
remote: [POLICY] - Rejected Commit: Sylvain Rochette <sylvain.rochette@gmail.com> (8659967)

We are updating a git hub project but we want to host the project locally before we push all our changes back to git hub. We were trying to use our Stash instance to do this, but it has a pre-commit hook policy which prevents commits from users other than the current user.

We don't have hooks enabled for the repo under the Stash report Hooks settings, so I don't know where it's getting this from

1 answer

1 accepted

0 votes
Answer accepted
John Lawlor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2016

I have found this page on configuring hooks:

https://confluence.atlassian.com/display/STASHKB/How+to+create+a+simple+hook+in+Stash

 

You just log onto the database, get the id of the repo, and then delete the corresponding script which is enforcing the hook

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events