Last active
November 15, 2018 14:22
-
-
Save MrAmbiG/ef17f5f058fcff956dcc554afbb7c1d2 to your computer and use it in GitHub Desktop.
This will write the content of db.conf to a file in your repository using curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/caspyin/2288960 | |
data_encoded=$(cat db.conf | openssl enc -base64) | |
curl -X PUT -k -H 'Authorization: token <my token>' -i 'https://api.github.com/repos/<username>/<reponame>/contents/<filename>' --data '{ "message": "commit message", "content": "'"$data_encoded"'"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment