提交 b4770e41 编写于 作者: S Shinwell Hu

script to generate gitee token

上级 ab275dea
#!/bin/bash
# refer to gitee.com/api/v5/oauth_doc#/list-item-2
source ~/.gitee_secret
echo "Refreshing ~/.gitee_token.json"
curl -s -X POST --data-urlencode "grant_type=password" --data-urlencode "username=$username" --data-urlencode "password=$password" --data-urlencode "client_id=$client_id" --data-urlencode "client_secret=$client_secret" --data-urlencode "scope=projects issues" https://gitee.com/oauth/token > ~/.gitee_token.json
chmod 400 ~/.gitee_token.json
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册