Skip to content

Instantly share code, notes, and snippets.

View geraldbl's full-sized avatar

Gerald Blondel geraldbl

  • GBMA
  • Malaysia
View GitHub Profile
@jobou363
jobou363 / bitbucketClone.ps1
Last active February 17, 2023 14:20
Powershell script to git clone or fetch all team project from bitbucket
# the purpose of the script was to do a backup of all the repositories in a bitbucket team locally
# you can add this script in a scheduler daily or a teamcity build get a backup locally of all source code
# the following script connect to bitbucket.org to get all team repositories
# it does a foreach to clone new repository or fetch, pull existing one
# use auth2 to get a token
# https://developer.atlassian.com/cloud/bitbucket/oauth-2/
# adapt the following script by
# 1- connect to your bitbucket account and create an auth consumer Key:Secret, give the read access to the project
# 2- create also an app password