This file contains 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
# 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 |