Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active August 29, 2015 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/79b1ab94efe47ec4bdaa to your computer and use it in GitHub Desktop.
Save guitarrapc/79b1ab94efe47ec4bdaa to your computer and use it in GitHub Desktop.
# install valentia
powershell -NoProfile -ExecutionPolicy unrestricted -Command 'iex ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String((irm "https://api.github.com/repos/guitarrapc/valentia/contents/valentia/Tools/RemoteInstall.ps1").Content))).Remove(0,1)'
# install GitContinuousPull
powershell -NoProfile -ExecutionPolicy unrestricted -Command 'iex ([Text.Encoding]::UTF8.GetString([Convert]::FromBase64String((irm "https://api.github.com/repos/guitarrapc/GitContinuousPull/contents/GitContinuousPull/Tools/RemoteInstall.ps1").Content))).Remove(0,1)'
# set git-credential-wincred into .girhub. Now git.exe read github credential from Windows Credential Manager.
git config --global credential.helper wincred
# set your github authenticated user/password
Set-ValentiaCredential -TargetName git
# then input some repository. git credential will automatically insert into Windows Credential Manager as git-credential-windred needed.
Import-Module GitContinuousPull -Force -Verbose
$param = @(
@{
RepositoryUrl = "https://github.com/neuecc/RespClient.git"
GitPath = "C:\Repository"
LogFolderPath = "C:\logs\RespClient"
LogName = "$((Get-Date).ToString("yyyyMMdd-HHmmss")).log"
}
)
$param | %{Start-GitContinuousPull @_ -Verbose}
# now both git and submodule never ask you for a credential anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment