Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#
# a one-liner to get raw content from github enterprise, relying on basic authentication.
# eliminates the need to create an access token and incorporate it in the url.
#
#
# fill in the blanks:
#
# USER your login user name for authentication (you'll be prompted for password on the terminal)
# GHE_DOMAIN the github enterprise custom domain
# REPO_OWNER the user/organization that owns the repository
# REPO_NAME the name of the repository
# REF a git ref, like a branch or commitish (most of the time you'll probably want to use 'master')
# FILE a path for the file to fetch, including file extension. also serves as a name for the file created locally
#
curl -u "$USER" https://${GHE_DOMAIN}/raw/${REPO_OWNER}/${REPO_NAME}/${REF}/${FILE} > ${FILE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.