Simplify travis encrypt ... --add on macOS, use KeyChain
-
Get Github Access Token follow the link.
-
Add link to KeyChain with:
Name: GITHUB_TOKEN Kind: application password Account: <your_user_name> password: <your_github_access_token>
-
Copy this script to folder in
$PATH
Get help:
travis-allow-push --helpAllow travis to push for current GitHub repo:
# cd <your_repo>
travis-allow-pushTo be prudent, it is NOT recommended to "always allow" security to access this entry in KeyChain, which means you will have to type your macOS login password everytime you want to allow travis push on a repo.
By default, you will have to type macOS login password TWICE everytime, and
you can change this behavior to type login password ONCE everytime after
adding application /usr/bin/security to the entrie's Access Control:
ref: apple.stackexchange.com 164545
- Double-click the keychain entry "GITHUB_TOKEN"
- Swith to right tab named "Access Control"
- Click "+" under "Always allow access by these applications"
- Press "Command + Shift + g", and type "/usr/bin/security", press "enter"
- Type macOS login password, and done.
Execute this script multiple times results in adding encryptions of the same info multiple times, which is redudant but not harmful.