Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: authorized-keys #19580

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/users/authorized-keys-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function add_authorized_key_dialog(keys) {
caption: _("Add"),
style: "primary",
clicked: () => {
console.log("adding key", state.text);
return keys.add_key(state.text);
}
}
Expand Down
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