We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c150f6f commit 8d2fd73Copy full SHA for 8d2fd73
Cachyos/ssh.sh
@@ -0,0 +1,22 @@
1
+#!/usr/bin/env bash
2
+# shellcheck enable=all shell=bash source-path=SCRIPTDIR
3
+set -euo pipefail
4
+shopt -s nullglob globstar
5
+
6
+EMAIL="${GIT_AUTHOR_EMAIL:-$(git config get user.email)}"
7
8
+mkdir -p ~/.ssh && chmod -R 700 ~/.ssh
9
+ssh-keygen -t ed25519 -C "$EMAIL" -f ~/.ssh/id_git -q
10
+eval "$(ssh-agent -s)" || eval (ssh-agent -cs)
11
+ssh-add ~/.ssh/id_git
12
13
+cat ~/.ssh/id_git.pub | wl-copy -r || cat ~/.ssh/id_git.pub | xclip -sel clipboard
14
+xdg-open
15
+echo "copy to to https://github.com/settings/keys and https://gitlab.com/-/user_settings/ssh_keys"
16
17
+ssh-keyscan -H github.com gitlab.com >>~/.ssh/known_hosts
18
19
+echo "Test GitHub connection"
20
+ssh -T [email protected]
21
+echo "Test GitLab connection"
22
0 commit comments