diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-25 06:29:07 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-25 10:03:35 -0400 |
commit | 7cbe854c63dc698e7bf9bb65d01f5f097ff08ea6 (patch) | |
tree | de4db8f5b7deef4e4044826dae10c1ebe0ee2786 /EndoForge | |
parent | 895dc23f69939ce8c96a6aff55a798d8e204c75b (diff) |
improve error message
Diffstat (limited to 'EndoForge')
-rwxr-xr-x | EndoForge/src/AnonymousAccessCommand | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/EndoForge/src/AnonymousAccessCommand b/EndoForge/src/AnonymousAccessCommand index ffdc07a..082f185 100755 --- a/EndoForge/src/AnonymousAccessCommand +++ b/EndoForge/src/AnonymousAccessCommand | |||
@@ -12,6 +12,20 @@ default_msg() | |||
12 | EOF | 12 | EOF |
13 | } | 13 | } |
14 | 14 | ||
15 | not_self_forge_message() | ||
16 | { | ||
17 | cat <<EOF >&2 | ||
18 | Error: access denied. The specified directory is not a self-forge. | ||
19 | |||
20 | To enable anonymous access, use the following commands: | ||
21 | |||
22 | ssh $(id -un)@$(hostname) | ||
23 | cd "$1" | ||
24 | git config core.self-forge true | ||
25 | |||
26 | EOF | ||
27 | } | ||
28 | |||
15 | get_sshfp_authline() | 29 | get_sshfp_authline() |
16 | { | 30 | { |
17 | ( | 31 | ( |
@@ -109,7 +123,7 @@ fi | |||
109 | 123 | ||
110 | if ! is_self_forge "$dir" | 124 | if ! is_self_forge "$dir" |
111 | then | 125 | then |
112 | echo 'Error: access denied. The specified directory is not a self-forge.' >&2 | 126 | not_self_forge_message "$arg" |
113 | exit | 127 | exit |
114 | fi | 128 | fi |
115 | 129 | ||