Forums | Mahara Community

Developers /
stuck trying to add commit-msg hook

Dirk Meyer's profile picture
Posts: 423

27 October 2014, 1:06 PM

I tried many times, created new accounts on Gerrit, Gitoriuos, changed keys many times, searched for hours but keep getting stuck here:

dirk@dirk-System-Product-Name:/var/www/mahara$ scp -p -P 29418 .git/hooks/
Agent admitted failure to sign using the key.
Permission denied (publickey).

Any help is appreciated.

Robert Lyon's profile picture
Posts: 431

27 October 2014, 4:42 PM

Hi Dirk,

I've not experienced that error before but this might help you:

It sounds like you are experiencing the same sort of problem



Aaron Wells's profile picture
Posts: 896

29 October 2014, 3:29 PM

Hi Dirk,

Another thing you can do to test whether your setup is correct, is this:

ssh -p 22418

If your SSH is set up correctly, you should get this response:

  ****    Welcome to Gerrit Code Review    ****

  Hi Aaron Wells, you have successfully connected over SSH.

  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:

  git clone ssh://

Connection to closed.

If it doesn't work, you can add the "-v" tag to get verbose output from SSH, which may give a clearer indication of where it's failing. And you can expand that to "-vv" and "-vvv" to get even more verbosity!

But I think that sshagent thing that Robert linked to is probably the problem. I vaguely recall having to fix something relating to that on my laptop a while back when I was having git problems.



Dirk Meyer's profile picture
Posts: 423

30 October 2014, 3:18 PM

Thanks Robert and Aaron,

I can successfully connect  to github using

ssh -T

as described here:

When I run

ssh -p 22418

I get 'ssh: connect to host port 22418: Connection timed out'

I'll figure it out one of these days. Thanks again.


Aaron Wells's profile picture
Posts: 896

31 October 2014, 2:53 PM

Sorry, that's a typo! It should be 29418, not 22418. Embarassed

The same port number you see in the git commands that gerrit generates, eg: git fetch ssh:// refs/changes/74/3874/3 && git checkout FETCH_HEAD



5 results