On Sat, 05 Jul 2014 19:19:54 +0200, Matt Welland <estifo...@gmail.com> wrote:

I'd like to automate a clone but I think I'd prefer the password not be in
the URL. The concern is that the password in the URL might be visible in
the webserver logs.

First, is this a legit concern? Second, how best to do this? AFAICT there
is no switch for fossil to take the password in on stdin.

I'd also like to automatically say "Y" to the question of storing the
password and I don't see any way to do that either.

something like this shell script

#---------------------------------------------------------------
#!/usr/bin/env expect

set timeout 60
spawn  fossil clone https://user@url_of_repo myclone.fossil

while 1 {
   expect {
      {password for}      {send "password_goes_here\r"}
      {remember password} {send "y\r"}
      eof                 {break}
   }
}
#---------------------------------------------------------------

should work (provided you have `expect' installed and provided the file `myclone.fossil' does not yet exist) although you still would have to put the password in clear text in the script (which hardly is desirable...). I only tested it with a small repo on a fast connection. no idea whether the chosen timeout value is always sufficient.

j.

ps: question to ML: it seems that doing the above via a shell "here document" (just redirecting user input to the `fossil clone' queries to the script via `<<EOF' and putting password and `Y' on the next lines) is not recognized by fossil. why not?




--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to