Using SmartGit's SSH client in hooks

When using a git repository hook, how can I use SmartGit's internal SSH client?

When using a hook with a scp operation, I receive a Permission Denied: (publickey) error.

SmartGit is aware of the credentials, they are listed under Edit > Preferences > Commands > Authentication, when pulling from the repository.

I require a commit-msg hook to generate Change-Id: tags in commit messages which is required for proper gerrit functioning (setup using the Mahara developer contribution guide):

#!/bin/sh
scp -p -P 29418 username@reviews.mahara.org:hooks/commit-msg .git/hooks/

Answers


This is not possible. When SmartGit invokes the Git binaries, it sets GIT_SSH environment variable to its internal client only for certain commands, like push and pull, but not for commit. So you will have to configure your SSH client manually, if you really think you will need a connection to the remote repository on commit (what IMHO shouldn't be necessary).


Need Your Help

Faster/Fastest way to get new sms messages when starting app - Android

android sqlite sms cursor

I have an sqlite database that contains all the sms messages of the user, however when you start the app I need to get all the sms's that I might not have if the user decides to use a different sms...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.