Reputation: 2742
I am creating a nightly build powershell script for an android app. It will behave like this:
This script will be run every night by a windows scheduled task.
I'm having trouble with automatically getting the latest code. I am being prompted for credentials. How can I write a nightly build script that includes my credentials so that I dont have type them in every single time?
Upvotes: 1
Views: 500
Reputation: 1325137
You can add a _netrc
file in C:\Users\Ben
with your credentials in it:
machine github.com
login yourGitHUbLogin
password yourGitHubPassword
See "Git - How to use .netrc
file on windows to save user and password".
If the idea of leaving your credential in plain text doesn't seem a good one, you can encrypt that file with gpg.
Upvotes: 2