-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Place the github secrets in ~/.netrc
which is a standard location and you will not commit them accidentally
- Loading branch information
Showing
3 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
username="johndoe" | ||
password="yourpassword" | ||
|
||
# This file used to define the shell variables `username` and `password` | ||
# but then they would show up in output of `ps`, `bash -x`... | ||
# It is better to use `~/.netrc` which `curl -n` will use. | ||
if ! grep -qs api.github.com ~/.netrc; then | ||
echo "Set up your Github credentials first:" | ||
echo " : >> ~/.netrc" | ||
echo " chmod 600 ~/.netrc" | ||
echo " echo 'machine api.github.com login USER password PASSWORD' >> ~/.netrc" | ||
exit 1 | ||
fi |