Git/Bitbucket

From Ever changing code
< Git
Revision as of 23:37, 1 November 2021 by Pio2pio (talk | contribs) (Created page with "Download all repositories from Bitbucket Server over https and basic auth <source lang=bash> #!/bin/bash REPOS=( repo1 repo2 ) BITBUCKET_USER=myuser BITBUCKET_PASS=$(echo cG...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Download all repositories from Bitbucket Server over https and basic auth

#!/bin/bash

REPOS=(
repo1
repo2
)

BITBUCKET_USER=myuser
BITBUCKET_PASS=$(echo cGFzc3dvcmQxCg== | base64 -d)
BITBUCKET_HOST=bitbucket.org
for REPO in ${REPOS[@]}; do
  git clone https://${BITBUCKET_USER}:${BITBUCKET_PASS}@${BITBUCKET_HOST}/scm/kub/$REPO.git
done