@@ -26,7 +26,7 @@ it_can_check_from_head_only_fetching_single_branch() {
2626 ! git -C $cachedir rev-parse origin/bogus
2727}
2828
29- it_fails_if_key_has_password () {
29+ it_fails_if_key_has_password_not_provided () {
3030 local repo=$( init_repo)
3131 local ref=$( make_commit $repo )
3232
@@ -39,9 +39,22 @@ it_fails_if_key_has_password() {
3939 return 1
4040 fi
4141
42- grep " Private keys with passphrases are not supported ." $failed_output
42+ grep " Private key has a passphrase but private_key_passphrase has not been set ." $failed_output
4343}
4444
45+ it_can_unlock_key_with_password () {
46+ local repo=$( init_repo)
47+ local ref=$( make_commit $repo )
48+ local passphrase=' some passphrase with spaces!'
49+
50+ local key=$TMPDIR /key-with-passphrase
51+ ssh-keygen -f $key -N " $passphrase "
52+
53+ local failed_output=$TMPDIR /failed-output
54+ check_uri_with_key_and_passphrase $repo $key " $passphrase " 2> $failed_output
55+ }
56+
57+
4558it_configures_forward_agent () {
4659 local repo=$( init_repo)
4760 local key=$TMPDIR /key-no-passphrase
@@ -956,7 +969,8 @@ run it_skips_excluded_commits_conventional
956969run it_skips_non_included_commits
957970run it_skips_non_included_and_excluded_commits
958971run it_does_not_skip_marked_commits_when_disable_skip_configured
959- run it_fails_if_key_has_password
972+ run it_fails_if_key_has_password_not_provided
973+ run it_can_unlock_key_with_password
960974run it_configures_forward_agent
961975run it_skips_forward_agent_configuration
962976run it_can_check_with_credentials
0 commit comments