Last active
September 18, 2021 19:14
-
-
Save arifsuhan/dc965340e5599cb181d6fa345106693e to your computer and use it in GitHub Desktop.
Clone Github Repository with Generate Github Auth Token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function run_cmd(){ | |
cmd="git clone https://"$1"@github.com/"$2"/"$3".git" | |
echo $cmd | |
eval $cmd | |
} | |
token="***" | |
owner=("user-A" "user-B") | |
repo_name=("repo-A" "repo-B") | |
index=1 | |
run_cmd $token ${owner[$index]} ${repo_name[$index]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment