The bitbucket repo that I want to test in CircleCI uses a git submodule. Following https://circleci.com/docs/github-security-ssh-keys/, I understand that I need to add a user key (instead of or in addition to a deploy key???). So on https://circleci.com/bb/TEAM/REPO/edit#checkout, I created a user key. However, while the main repo is checked out fine with the deploy key, the submodule cannot be checked out:
$ git submodule update --init
Cloning into ‘/home/ubuntu/…’…
repository access denied. deployment key is not associated with the requested repository.
I have experimented with various configurations: deploy key as preferred and user key as second, user key as preferred and deploy key as second, only a user key. No configuration works.
While experimenting, I have noticed several things:
- on https:// circleci.com/bb/TEAM/REPO/edit#checkout, the deploy key hyperlinks to https:// bitbucket.org/TEAM/REPO/admin/deploy-keys/, which is a dead link. The correct link would probably be https:// bitbucket.org/TEAM/REPO/admin/access-keys/.
- adding a deploy key via CircleCI adds one on the above bitbucket page, but deleting the deploy key again via CircleCI does not delete it on that bitbucket page
- on https:// circleci.com/bb/TEAM/REPO/edit#checkout, the user key is not hyperlinked
- and indeed, when adding a user key via CircleCI, I don’t see any new key on https:// bitbucket.org/account/user/TEAM/ssh-keys/ or https:// bitbucket.org/account/user/USER/ssh-keys/. Is it meant to show up somewhere else?
So it seems that somehow this user key generation does not work. From the command line, I can check out the main repo and the submodule just fine.
PS: excuse the spaces in the links above, as a new user, apparently I’m not allowed to add more than two links