Private modules package from bitbucket repo with a submodule path

Hello.

I have setup a site from a private bitbucket repo. I have added the deploy key to my account Log in with Atlassian account

The site starts to build.

However there is a private repo as a node package. I created a bitbucket App password in BB. Then used the below format to grant access to that repo but it has a private submodule.

in package.json
"@yapily/styleguide": "git+https://USER:PASSWORD@bitbucket.org/yapily/yapily-vue-styleguide.git",

I’m pretty certain it can access that repo and then fails on accessing the submodule.

How can I get around this issue? I have admin rights to all 3 repos concerned.

thanks, D

the error I get is -

10:47:58 AM: npm ERR! Command failed: git submodule update -q --init --recursive
10:47:58 AM: npm ERR! warning: templates not found in /tmp/pacote-git-template-tmp/git-clone-465c8c2f
10:47:58 AM: npm ERR! Host key verification failed.
10:47:58 AM: npm ERR! fatal: Could not read from remote repository.
10:47:58 AM: npm ERR!
10:47:58 AM: npm ERR! Please make sure you have the correct access rights
10:47:58 AM: npm ERR! and the repository exists.
10:47:58 AM: npm ERR! fatal: clone of 'git@bitbucket.org:yapily/yapily-styleguide.git' into submodule path '/opt/buildhome/.npm/_cacache/tmp/git-clone-e6138710/src/assets/styles' failed
10:47:58 AM: npm ERR! Failed to clone 'src/assets/styles'. Retry scheduled
10:47:58 AM: npm ERR! warning: templates not found in /tmp/pacote-git-template-tmp/git-clone-465c8c2f
10:47:58 AM: npm ERR! Host key verification failed.
10:47:58 AM: npm ERR! fatal: Could not read from remote repository.
10:47:58 AM: npm ERR!
10:47:58 AM: npm ERR! Please make sure you have the correct access rights
10:47:58 AM: npm ERR! and the repository exists.
10:47:58 AM: npm ERR! fatal: clone of 'git@bitbucket.org:yapily/yapily-styleguide.git' into submodule path '/opt/buildhome/.npm/_cacache/tmp/git-clone-e6138710/src/assets/styles' failed
10:47:58 AM: npm ERR! Failed to clone 'src/assets/styles' a second time, aborting```

Hey there, @dpcY :wave:

Thanks for reaching out! It looks like this thread has been a bit quiet for the past week. Are you still encountering this issue? If so, please let us know so we can dive in further.

Yes I am. Seems like a fairly straight forward requirement but may have to move away from netlify if we can’t access our core components.

Interesting! I was working on this topic a little earlier today and it might give you some inspiration.

2 Likes

thanks Pie - my setup is a bit more complicated. I have a private repo as an NPM package. After testing the passwords work using this format
"https://ndr4:{MYAPPPASSWORD}@bitbucket.org/yapily/yapily-vue-styleguide.git"

However that NPM package hosted on Bitbucket has a private submodule in its Bitbucket repo.

5:42:18 PM: npm ERR! Host key verification failed.
5:42:18 PM: npm ERR! fatal: Could not read from remote repository.
5:42:18 PM: npm ERR!
5:42:18 PM: npm ERR! Please make sure you have the correct access rights
5:42:18 PM: npm ERR! and the repository exists.
5:42:18 PM: npm ERR! fatal: clone of 'git@bitbucket.org:xxx/xxx.git' into submodule path 

I’ve added the keys from netlify to BB. To the repos themselves or to my account as a whole.

Our guide has 3 very well described routes to achieve this, hopefully, so before I sign off for the evening I felt like it would be useful to share this with you to try!

1 Like