改成main
gh api \
-X PATCH \
-H "Accept: application/vnd.github+json" \
/repos/itamiokanjiro/itamiokanjiro.github.io \
-f default_branch=main
22
curl -X PATCH \
-H "Authorization: token 我的token" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/itamiokanjiro/itamiokanjiro.github.io \
-d '{"default_branch":"main"}'
gh登入 創建itamiokanjiro.github.io
gh auth login
gh repo create Genshin-Discord-Bot –private –confirm
gh登出
gh auth logout
強制設定看main
gh api -X POST /repos/itamiokanjiro/video-play/pages \
-f source.branch='main' \
-f source.path='/'
刪除
gh repo delete itamiokanjiro/test.github.io
GitHub.com -> SSH -> Yes -> 密碼 -> Paste an authentication token ->
由於github被封
gh auth login
cp /root/snap/gh/640/.config/gh/hosts.yml /root/snap/gh/640/.config/gh/hosts_account1.yml
gh auth logout
cp /root/snap/gh/640/.config/gh/hosts.yml /root/snap/gh/640/.config/gh/hosts_account2.yml
cat /root/snap/gh/640/.config/gh/hosts.yml
gh repo create video-play --public --confirm
cp /root/snap/gh/640/.config/gh/hosts_account1.yml /root/snap/gh/640/.config/gh/hosts.yml
cp /root/snap/gh/640/.config/gh/hosts_account2.yml /root/snap/gh/640/.config/gh/hosts.yml