-2

i am trying to clone from github to ubuntu automatically using shell script, i face a problem:

after git clone "repos..." we must add username and after username password.

If i have a shell script:

#!/bin/bash
echo AutoClone From github
echo ===================================================
git clone "repos..."
# here i need to add something that add username and password automatically when git clone was applied.
done

Real example:

root@localhost:~# git clone https://github.com/....
root@localhost:~# git clone https://github.com/...
Cloning into 'NewFrontEnd'...
Username for 'https://github.com':

Username must be also in shell script and automatically added.

1 Answers1

0

Sounds like a Tcl/expect script fits you better in this case. Or setup your SSH keys to clone the repos without entering your username and password.

biwiki
  • 62
  • 3