Page MenuHome GnuPG

git pushing to playfair yields "error: invalid key: hooks.denypush.branch.XXX" and "error: invalid key: hooks.denymerge.XXX"
Closed, ResolvedPublic


When i tried to push a new branches to playfair over on T3464, i see error messages:

remote: error: invalid key: hooks.denypush.branch.dkg/fix-T3464        
remote: error: invalid key: hooks.denymerge.dkg/fix-T3464

My git remote URL for pushing is (and ssh is configured to try dkg as my default username).

I have no idea what these error messages mean, but they're pretty common when i try to push a new branch here.

Event Timeline

That is due to the update hook which has code like this:

deny_push_email=$(git config "hooks.denypush.branch.$branch")
 case $deny_push_email in
         '') ;;
         *) printf "error: *** %s\n" \
               "commit on branch '$branch'" \
               "locked by $deny_push_email" >&2

Now the slash in your $brach violates the rule that a config name may have only alpahnumeric characters, dot, or dash. Time to employ tr(1).

Just did that: slashes and dots are now mapped to hyphens. Let me know if the problem persists.

werner changed the task status from Open to Testing.May 31 2019, 9:16 AM
werner triaged this task as Low priority.

fwiw, i'm used to using slashes in my branch names in dozens of other projects. I was trying to keep my branches scoped under dkg/ so that others could ignore them if they wanted. If the only issue is that i need to not do that, i'm fine naming them with hyphens instead of slashes (or whatever). I'll use that rule for future work.

thanks for letting me know, and for proposing a fix!

werner claimed this task.

@dkg: Please keep using slashes. The problem was that slashes are not allowed in git config keys. We use the branch name in some git config keys and thus they need to be mapped to soemthing different (ie. '-').