I'm trying to "pull" the git directory as an anonymous user with: ./scripts/switch_all_submodules_to_head_and_clean For each submodule, it ask me for a password, three times (submodule + admin + cmake). That means doing "Enter" 378 times... Is there a way to bypass this procedure?
I'm trying to "pull" the git directory as an anonymous user with: ./scripts/switch_all_submodules_to_head_and_clean For each submodule, it ask me for a password, three times (submodule + admin + cmake). That means doing "Enter" 378 times... Is there a way to bypass this procedure?
This is one of GIT's more irritating limitations. What I ended up doing was creating a bash script "gitpass" in my home directory like this:
#!/bin/bash echo "<mypassword>"
For anonymous usage "<mypassword>" can be replaced with "".
Mark the script executable (chmod +x ~/gitpass), then export the GIT_ASKPASS variable in the terminal you will be pulling the sources in like this:
export GIT_ASKPASS=~/gitpass
Then run the ./scripts/switch_all_submodules_to_head_and_clean script from that terminal, and GIT shouldn't bug you for a password.
I might be able to incorporate something like the above into the checkout script, but for now this manual procedure should get you going.
Tim
Le 05/12/2011 21:20, Timothy Pearson a écrit :
This is one of GIT's more irritating limitations. What I ended up doing was creating a bash script "gitpass" in my home directory like this:
#!/bin/bash echo "<mypassword>"
For anonymous usage "<mypassword>" can be replaced with "".
Mark the script executable (chmod +x ~/gitpass), then export the GIT_ASKPASS variable in the terminal you will be pulling the sources in like this:
export GIT_ASKPASS=~/gitpass
Then run the ./scripts/switch_all_submodules_to_head_and_clean script from that terminal, and GIT shouldn't bug you for a password.
I might be able to incorporate something like the above into the checkout script, but for now this manual procedure should get you going.
Thanks a lot.
I found a simple way to do it:
export GIT_ASKPASS=/bin/echo ./scripts/switch_all_submodules_to_head_and_clean
Timothy Pearson a écrit :
I'm trying to "pull" the git directory as an anonymous user with: ./scripts/switch_all_submodules_to_head_and_clean For each submodule, it ask me for a password, three times (submodule + admin + cmake). That means doing "Enter" 378 times... Is there a way to bypass this procedure?
This is one of GIT's more irritating limitations. What I ended up doing was creating a bash script "gitpass" in my home directory like this:
So there's no option to tell Git to not ask for passwords?
Nicolas
Timothy Pearson a écrit :
I'm trying to "pull" the git directory as an anonymous user with: ./scripts/switch_all_submodules_to_head_and_clean For each submodule, it ask me for a password, three times (submodule + admin + cmake). That means doing "Enter" 378 times... Is there a way to bypass this procedure?
This is one of GIT's more irritating limitations. What I ended up doing was creating a bash script "gitpass" in my home directory like this:
So there's no option to tell Git to not ask for passwords?
No. The workaround mentioned in this thread with /bin/echo is pretty clever though, and performs very closely to what is desired.
Tim