Skip to content

Commit

Permalink
debug: authorized-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jelly committed Nov 7, 2023
1 parent f959a07 commit d70bf14
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/users/authorized-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function AuthorizedKeys (user_name, home_dir) {
}

self.add_key = function(key) {
console.log("adding key", key);
return parse_pubkeys(key)
.then(keys => {
const obj = keys[0];
Expand All @@ -109,6 +110,8 @@ function AuthorizedKeys (user_name, home_dir) {
// eslint-disable-next-line prefer-promise-reject-errors
.catch(ex => Promise.reject(_("Error saving authorized keys: ") + ex)); // not-covered: OS error
} else {
console.log("objects", keys);
console.log("key", key);
return Promise.reject(_("The key you provided was not valid."));
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/run
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ case "${TEST_SCENARIO:=}" in
PREPARE_OPTS="$PREPARE_OPTS --quick"
;;&
*other*)
RUN_OPTS="$RUN_OPTS $(echo "$ALL_TESTS" | grep -Ev "$RE_NETWORKING|$RE_STORAGE|$RE_EXPENSIVE")"
RUN_OPTS="$RUN_OPTS TestKeys.testAuthorizedKeys"
;;&

esac
Expand Down
Loading

0 comments on commit d70bf14

Please sign in to comment.