the reason that git askes for password even you've assigned
cmd.Stdin to null is that it is reading directly from your
terminal (ssh keyboard-interactive auth for example).

you need to use some pseudo terminal trickery to trick
it.it is certainly possible to do in go, but i think you can
use some existing unix command to do that. for example

for git, though, you can set env. var $GIT_ASKPASS
to an external command (/bin/false for example)
to simulate the case when user doesn't provide
a pass. (git help config, look for core.askpass
for this feature). note that you can use $GIT_CONFIG
to provide git a config to override its behavior.


Search Discussions

  • Random0x00 at Oct 18, 2012 at 6:48 pm
    Thanks! Using GIT_ASKPASS worked flawlessly. And thanks for explaining why this was happening in
    the first place.

    The sample git repo has been updated and works after this fix.

    What do you guys think about the idea of providing status information about go package repositories.

    This is what I have in mind:

    * Mark packages with CanGet if they are "go getable".
    * Mark packages with CanBuild if they are able to compile with "go build"
    - Some packages (mostly those using cgo) will not compile using "go build", but it could still
    be a valuable indicator.
    * Parse the package documentation and give some status regarding it's quality.
    - This status should be based on godoc conventions.
    - For instance: "Notice this comment is a complete sentence that begins with the name of the
    element it describes."
    ref: http://golang.org/doc/articles/godoc_documenting_go_code.html

    Do you have any ideas that might be interesting to try when giving some rough status about the
    maturity of a package?

    * "go vet"?
    * ...

    Thanks for your input.

    cheers /u


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
postedOct 18, '12 at 6:48p
activeOct 18, '12 at 7:44p

2 users in discussion

Minux: 1 post Random0x00: 1 post



site design / logo © 2022 Grokbase