GITHUB_ACCESS_TOKEN='hoge'
GITHUB_USER_NAME='ppworks'
GITHUB_REPOSITORY_NAME='pplog'
GITHUB_BRANCH='master'
FETCH_FILE_NAME='db/schema.rb'
curl --header "Authorization: token $GITHUB_ACCESS_TOKEN" \
--header 'Accept: application/vnd.github.v3.raw' \
--output $FETCH_FILE_NAME \
--location "https://api.github.com/repos/$GITHUB_USER_NAME/$GITHUB_REPOSITORY_NAME/contents/$FETCH_FILE_NAME?ref=$GITHUB_BRANCH"
More than 5 years have passed since last update.
githubのprivate repository からファイルを1つもってくる
Last updated at Posted at 2016-01-06
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme