Last active
August 29, 2015 14:23
-
-
Save MoLow/87f4f46df37d9a137824 to your computer and use it in GitHub Desktop.
Git auto input username & password for ssh
This file contains hidden or 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
| C:\> git config --global core.askpass C:\<path>\git-gui--askpass | |
| C:\<path>\git-gui--askpas: | |
| #!/bin/sh | |
| # Tcl ignores the next line -*- tcl -*- \ | |
| exec wish "$0" -- "$@" | |
| set answer "" | |
| set prompt [join $argv " "] | |
| if {[regexp -nocase {(username)(\w*)} $prompt]} { | |
| set answer "<Set Username>" | |
| } | |
| if {[regexp -nocase {(password)(\w*)} $prompt]} { | |
| set answer "<set passwod>" | |
| } | |
| puts $answer | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment