samkuehn/bitbucket-backup
소개
모든 Bitbucket 저장소를 로컬에 백업하는 Python 스크립트입니다. Git과 Mercurial 저장소 모두 지원합니다.
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalBitbucket backup
Description
This python script will backup all of your Bitbucket repos (both mercurial and git) locally.
If the repository does not exist locally the repo will be cloned to the <local_backup_location>.
If the repo does exist locally an hg pull will be run for mercurial repos,
and git remote update will be run for git repos.
Installation
pip install -U https://github.com/samkuehn/bitbucket-backup/archive/master.zip
Quickstart
bitbucket-backup [-u <bitbucket_username>] [-p <bitbucket_password>] [-k <oauth_key>] [-s <oauth_secret>]
[-l <local_backup_location>] [-t <bitbucket_team>] [-a] [-v] [-q] [-c] [--http] [--skip-password] [--mirror]
[--prune] [--fetchlfs]
Username/password are needed to access the Bitbucket API to get a repo listing. At this time it is not used to do the clone/update. Clone/update requires that your SSH keys have been uploaded to Bitbucket.
You can backup a team's repositories instead of your own by supplying the optional -t parameter
and entering the team slug (this is now called a "Workspace" by BitBucket).
App passwords
If would like, you can use app passwords instead of your password used to login to Bitbucket. The password must have read repositories permission. https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html
OAuth authentication
You can use OAuth authentication if you do not want to use username/password. There are 4 steps to using OAuth.
- Create OAuth consumer keys here: https://bitbucket.org/account/user/{username}/api
- Make sure that your consumer has the following permissions:
- Account: Read
- Projects: Read
- Repositories: Read
- Specify the -k <oauth_key> -s <oauth_secret> flags
- Make sure requests-oauthlib is installed
pip install requests-oauthlib
Requirements
You do need to have your SSH keys uploaded for the computer that you are running the backup on.
Additional notes
I am hosting this on GitHub because I believe it is superior for public repos (I understand the irony).
관련 프로젝트 살펴보기
불러오는 중…