-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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.