Skip to content

Instantly share code, notes, and snippets.

@jauderho
Last active August 17, 2021 06:57
Show Gist options
  • Select an option

  • Save jauderho/e39bfbe0e7775995c43f8d6887f13c96 to your computer and use it in GitHub Desktop.

Select an option

Save jauderho/e39bfbe0e7775995c43f8d6887f13c96 to your computer and use it in GitHub Desktop.
PAT="mypat123"
REPO_URL="https://[email protected]/myorg/myrepo/_git/myrepo"
AUTH=$(echo -n ":$PAT" | openssl base64 | tr -d '\n')
git config --global http.$REPO_URL.extraHeader="Authorization: Basic $AUTH"
git -c http.$REPO_URL.extraheader="Authorization: Basic $AUTH" clone $REPO_URL --no-checkout --branch master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment