Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
(auth-) issues using BitBucket for backups
« previous
next »
Print
Pages: [
1
]
Author
Topic: (auth-) issues using BitBucket for backups (Read 1327 times)
Guybrush_Treepwood
Newbie
Posts: 2
Karma: 0
(auth-) issues using BitBucket for backups
«
on:
May 09, 2023, 02:41:08 pm »
Context:
1) Very satisfied OPNsense user for 10+ years
2) OPNsense 22.7.11_1 (APU4 device)
3) Required plugin name & status: os-git-backup (installed) v1.0_3
4) Generated SSH keys (ed25519) on OPNsense device with following command:
# ssh-keygen -t ed25519 -C "backup_up cfg OPNsense"
5) added id_ed25519.pub key to my personal BitBucket account.
Problem: unsuccessful backup of config (xml-) from opnsense node to a repo @ Bitbucket.org
From the generic logfile (filtered on 'error'): git-backup
authentication
failure (Warning: Permanently added 'bitbucket.org' (RSA) to the list of known hosts.\x0d Load key "/conf/backup/git/identity":
invalid format\x0d
<users_mail_address>@bitbucket.org: Permission denied (publickey).\x0d fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. )".
Solution direction:
Add one (1) additional section 'Bitbucket' to the "System: Configuration: Backups" page
make new plugin 'os-bitbucket-backup' (based on the 'os-git-backup' plugin)
Solve ( / clarify-) the authentication URL formatting for BitBucket.
I would think that the following formatting could work:
URL: 'ssh://bitbucket.org:<workspace_name>/<repo_name.git>'
Thnx for looking into this.
Guybrush_Treepwood.
Logged
Martijn
Newbie
Posts: 1
Karma: 1
Re: (auth-) issues using BitBucket for backups
«
Reply #1 on:
June 12, 2023, 01:04:46 pm »
by checking the source code I figured out how to get this working:
when using https, the url will become this: https://<username>:<token>@bitbucket.org/{workspace}/{repository}.git
According to the manual of Bitbucket, you need to use this:
https://x-token-auth
:{repository_access_token}@bitbucket.org/{workspace}/{repository}.git
so the username should be "x-token-auth"
Logged
Guybrush_Treepwood
Newbie
Posts: 2
Karma: 0
Re: (auth-) issues using BitBucket for backups
«
Reply #2 on:
September 06, 2023, 09:17:37 am »
Hi Martijn,
Thnx. You have guided me into the right direction. There are a few steps more to get to a working solution. I know how to skin that cat.
./Guybrush_Treepwood
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
(auth-) issues using BitBucket for backups