Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Requires TortoiseGit: cinst tortoisegit
- ;If it doesn't work, run as administrator (for TortoiseGit automation)
- ;Add this to PowerShell profile
- ; $sshaskpass_path = 'C:\Program Files\TortoiseGit\bin\sshaskpass.exe'
- ; if (Test-Path $sshaskpass_path) { $ENV:GIT_ASKPASS = $sshaskpass_path } else { Write-Warning 'Git profile: sshaskpass not found' }
- #SingleInstance, force
- user := "<YOUR USERNAME HERE>"
- pass := "<YOUR PASS HERE>"
- SetKeyDelay, 0
- wait:
- WinWait, ahk_exe sshaskpass.exe
- WinGetText, win_text
- if InStr(win_text, "Username for")
- ControlSend, Edit1, %user%{ENTER}, ahk_exe sshaskpass.exe
- if InStr(win_text, "Password for")
- ControlSend, Edit1, %pass%{ENTER}, ahk_exe sshaskpass.exe
- Goto, wait
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement