junxnone / xwiki

https://junxnone.github.io/xwiki/
0 stars 0 forks source link

Tools Github Token #307

Open junxnone opened 5 months ago

junxnone commented 5 months ago

Develop with Github personal access token

Github Setup

image

[!note]
保存好 token 备用

Host 端设置


git_repo_token=ghp_ZoDxxxx
git_username="your_user_name"
git config --global user.name  $git_username
touch ~/.git-credentials
echo "https://$git_username:$git_repo_token@github.com" > ~/.git-credentials
git config --global credential.helper store
cat << EOF > ~/.netrc
machine github.com
  login not-used
  password $git_repo_token
machine api.github.com
  login not-used
  password $git_repo_token
EOF