New user unable to fetch private dependencies for BitBucket

bitbucket
golang

#1

I’m a new user trying to get a Bitbucket-hosted Golang project to build. I’m using the reference circle.yml at https://circleci.com/docs/language-go/ . So far, I’m unable to even fetch my private dependencies. All the dependencies have both user and deploy keys, but I’m getting the error below, which apparently occurs when CircleCI runs ‘git ls-remote’ :

Warning: Permanently added ‘bitbucket.org,104.192.143.3’ (RSA) to the list of known hosts.

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Guidance?

Thanks much


#2

Hello @jjharr,

Have you tried revoking your Bitbucket token and generating a new one for the project?

There could have been an error when creating the token for your account after signup,
usually this can be resolved by rolling tokens.

Hope that helps, please let us know if you need further assistance.


#3

Hi @zzak Thank you for taking the time to reply. Unfortunately, I regenerated everything and no luck. I suspect this is actually a BitBucket issue. There are similar complaints related to BitBucket from other apps. And they recently merged their BitBucket accounts into global Atlassian accounts.

I’ll see if I can get some help from BitBucket. But if there’s any guidance you can give me about how I can look deeper into the issue from the CircleCi side, perhaps through SSHing into the CI VM, that would be very helpful. If we can get CircleCI to work for us, we’ll be paying customers, but obviously… want to make sure it works for us.

Thanks


#4

Hey @zzak, I’ve created just user keys for all my private bitbucket dependencies, but they do not show up in BitBucket. That looks like it might be a CircleCI issue.


#5

Hello @jjharr,

Could you please reach out to support@circleci.com and we’ll get someone to help resolve this issue with BitBucket?

Best,
Zak


#6

Thanks @zzak. I’ve done that.


#7

Hello,

Thank you for your report, this is currently a known issue until Bitbucket is able to provide us an API to create user keys. Here is a workaround in the interim.

From https://circleci.com/bb/<Your-Organization-ID>/<Your-Project-ID>/edit#checkout:

  1. Open Inspect Element in your browser’s developer tools.
  2. Click Create User Key
  3. Find the new public key generated in the Network tab.
  4. Go to your Bitbucket account and add it manually.

Let us know if this work around solves your problem, and feel free to reach out to support@circleci.com

Best,
@zzak


#8