[blog]
githubにリポジトリ作った
Astroにしたので、どっかで管理したほうがいいかなと思ってgithubのプライベートリポジトリにファイルを置くことにした。
- .sshディレクトリに移動して、sshキーを作成
- ssh-keygen -t ed25519 -C “your-email@example.com”
- cat ~/.ssh/id_ed25519.pub (id_****は変更可能)
- 内容をgithubのssh登録に設定
- 他にもgithubの設定があるので、.ssh/configに以下を追記(id_****は作った秘密鍵)
Host github-astro-blog
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
- github側でastro-blogリポジトリを作成する
- ブログのディレクトリで以下を実行
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin git remote add origin git@github-astro-blog:[githubのユーザー名]/astro-blog.git
git push -u origin main
無事入ったっぽい。