Skip to content
Snippets Groups Projects

Expect Example

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Chris Coley
    expect-clone-repo.sh 374 B
    expect -c " \
    set timeout -1; \
    spawn git clone https://git.codingallnight.com/chris/dotfiles.git ~/dotfiles; \
    expect \\\"Username for 'https://git.codingallnight.com': \\\"; \
    send -- \\\"#{vc['git']['username']}\\r\\\"; \
    expect \\\"Password for 'https://#{vc['git']['username']}@git.codingallnight.com': \\\"; \
    send -- \\\"#{vc['git']['password']}\\r\\\"; \
    expect eof"
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment