* Initial plan * Consolidate mise tools installation and fix GitHub Copilot CLI package Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> * Revert copilot package changes and remove --jobs flag from mise install Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> * fix: permissions * Move GitHub CLI (gh) installation to mise Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: andrejusk <7396847+andrejusk@users.noreply.github.com> Co-authored-by: Andrejus <git@andrejus.uk>
29 lines
702 B
Bash
Executable File
29 lines
702 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Description:
|
|
# Print SSH key.
|
|
#
|
|
|
|
# Skip in Codespaces (managed by GitHub)
|
|
[[ "$DOTS_ENV" == "codespaces" ]] && { log_pass "Skipping in Codespaces"; return 0; }
|
|
|
|
# Skip if explicitly disabled
|
|
[[ -n "$SKIP_SSH_CONFIG" ]] && { log_warn "Skipping SSH configuration"; return 0; }
|
|
|
|
ssh_method="ed25519"
|
|
|
|
ssh_target="${HOME}/.ssh"
|
|
ssh_key="${ssh_target}/id_${ssh_method}"
|
|
ssh_pub="${ssh_key}.pub"
|
|
if [ ! -f "$ssh_key" ]; then
|
|
ssh-keygen \
|
|
-t "$ssh_method" \
|
|
-f "$ssh_key" \
|
|
-C "$(whoami)@$(hostname)-$(date -I)"
|
|
fi
|
|
|
|
cat "$ssh_pub"
|
|
|
|
unset ssh_method ssh_target ssh_key ssh_pub
|