giget
giget copied to clipboard
Unable to fetch private Bitbucket repository
Environment
Node: v18.15.0 Nuxt: v3.7.0
Reproduction
Using nuxt:
- Create a private Bitbucket repository
- Initialize a new nuxt project
- Extend your project with the Bitbucket repository (see code below)
Using pure giget:
- Create a private Bitbucket repository
- Try to fetch the private repository
Either way the fetch will fail
Describe the bug
I am working on a Nuxt Layers project. Nuxt uses uses unjs/giget
internally to fetch remote git repositories, but is unable to fetch private Bitbucket repositories. I already raised an issue at the Nuxt repository, but was forwarded to create an issue here.
nuxt setup:
- .env-file:
GIGET_AUTH=XXXXXXXXXXXXXXXX`
- nuxt.config.ts:
export default defineNuxtConfig({
extends: [
'bitbucket:user_name/project_name#branch_name',
],
// ...
})
Internally unjs/giget converts this to https://bitbucket.org/user_name/project_name/get/branch_name.tar.gz
.
If I try to execute this with npx, the fetch fails:
npx giget@latest https://bitbucket.org/user_name/project_name/get/branch_name.tar.gz --auth XXXXXXXXXXXXXXXX
In my opionion something like https://api.bitbucket.org/2.0/repositories/user_name/project_name/src/branch_name/
would be more correct.
I found an issue for private Github repos which seems pretty similar to my problem. The issue was fixed but is not published yet. Someone also already addressed the problem with private Bitbucket repositories. However the response was insufficient to me.
Am I missing something? Is this a known bug? If so, will it be fixed in a future release? Any help is appreciated.
Additional context
No response
Logs
No response