- macOS (Apple Silicon)
- Ubuntu 24.04 LTS
- Ubuntu 24.04 LTS on WSL2
-
Generate SSH key
ssh-keygen -t ed25519 -N "" -f ~/.ssh/github
-
Copy public key
# macOS pbcopy < ~/.ssh/github.pub # Linux cat ~/.ssh/github.pub
-
Add SSH key to GitHub
- Go to https://github.com/settings/keys
- Click "New SSH key"
- Title: any name (e.g., PC name)
- Key type: Authentication Key
- Paste the public key
-
Add Signing key to GitHub
- Click "New SSH key" again
- Title: any name
- Key type: Signing Key
- Paste the same public key
-
Configure SSH
cat >> ~/.ssh/config << 'EOF' Host github.com IdentityFile ~/.ssh/github User git EOF
-
Verify connection
ssh -T github.com
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)Open a new terminal to verify:
nix --versionUse nix run to temporarily get git
(no Command Line Developer Tools needed on macOS):
nix --extra-experimental-features 'nix-command flakes' run nixpkgs#git -- clone git@github.com:i9wa4/dotfiles ~/ghq/github.com/i9wa4/dotfiles
cd ~/ghq/github.com/i9wa4/dotfilesnix-darwin will fail if /etc/zshenv or /etc/zshrc exist with unrecognized content.
sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin 2>/dev/null || truesudo mv /etc/zshrc /etc/zshrc.before-nix-darwin 2>/dev/null || truenix-darwin manages Homebrew packages, but Homebrew itself must be installed manually.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"cf. Homebrew
sudo nix --extra-experimental-features 'nix-command flakes' run nix-darwin -- switch --flake '.#macos-p' --impure --no-update-lock-fileor
sudo nix --extra-experimental-features 'nix-command flakes' run nix-darwin -- switch --flake '.#macos-w' --impure --no-update-lock-fileOpen a new terminal after completion.
touch ~/.gitconfig
git config --global user.name "Your Name"
git config --global user.email "your@email.com"nix run home-manager -- switch --flake '.#ubuntu' --impurechsh -s $(which zsh)Open a new terminal after completion.
touch ~/.gitconfig
git config --global user.name "Your Name"
git config --global user.email "your@email.com"sudo apt-get install -y openssh-server
sudo systemctl daemon-reload
sudo systemctl start ssh.service
sudo systemctl enable ssh.servicemake win-copygh auth login
# Choose SSH for Git operation protocol
# Skip uploading SSH public key
# Login with a web browserTo copy auth to another machine:
gh auth status --show-token | gh auth login --with-token- Configuring IAM Identity Center authentication with the AWS CLI
- Configuration and credential file settings
- Password: No
- Address: No
- Google Pay: No
- The Others: Yes
- Google Japanese:
https://www.google.com/search?q=%s - Google English:
https://www.google.com/search?q=%s&gl=us&hl=en&gws_rd=cr&pws=0
- Flow Chat for YouTube Live
- Okta Browser Plugin
- Slack Channels Grouping
GitHub Notifications:
/github subscribe owner/repo reviews,comments,branches,commits:*
- [Server] Set
PasswordAuthentication yesin/etc/ssh/sshd_config - [Server]
sudo systemctl restart ssh.service - [Client]
ssh-keygen -t ed25519 - [Client]
ssh -p port username@hostname - [Client] Copy public key to server:
scp -P port ~/.ssh/id_ed25519.pub username@hostname:~/.ssh/register_key - [Server] Add to authorized_keys:
cat ~/.ssh/register_key >> ~/.ssh/authorized_keyschmod 600 ~/.ssh/authorized_keys - [Server] Set
PasswordAuthentication noand restart ssh - [Client] Configure
~/.ssh/config
See CONTRIBUTING.md.