Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

How do I clone a git repository with extraHeader

PAT="mypat123"
REPO_URL=https://myorg@dev.azure.com/myorg/myrepo/_git/myrepo"
AUTH=$(echo -n ":$PAT" | openssl base64 | tr -d '
')
git -c http.$REPO_URL.extraheader="Authorization: Basic $AUTH" clone $REPO_URL --no-checkout --branch master
Source by github.com #
 
PREVIOUS NEXT
Tagged: #How #I #clone #git #repository #extraHeader
ADD COMMENT
Topic
Name
5+8 =