I’m using the free version of cloud docker as a trial basis for the eventuality of purchasing an enterprise license of Docker Cloud for CI/CD. I have an integration with BitBucket set up and an automated trigger to build upon commit. So far I made 9 successful builds, however as of today, I’m having problems with the automated build. The build is failing automatically and I’m receiving an e-mail stating
ERROR: Error when trying to create deploy key
ERROR: Build in 'master:/ToDoList:/ToDoList.Web/Dockerfile' (731913ce) failed in 0:00:01
When I go to the build task to view additional information, I can’t seem to find anything which might help me pin point what exactly the issue is. Here’s a screenshot:
Following what can only be explained as an arduous 20 hours, I performed the following operations to finally get a successful build:
Unlink BitBucket provider from Docker Cloud
Remove Docker Cloud access from BitBucket OAuth
Create a new Docker Cloud repository, and relink Docker Cloud to Bit Bucket
Notes:
Deleting a repository on Docker Cloud does not really delete it. (??!). As soon as you create a new repository with the same name, all the old build settings return - which makes me believe that other “hidden” settings and caches are not removed as well. So simply recreating the repository will not solve the above problem. It has to be a new repository with a new name.
I can fairly say that my experience so far with Docker Cloud has not been in any way pleasant, and none of the time-saving features have actually saved my time. To the contrary. But I digress.
Yes by doing the steps I outlined in my post, I have managed to make the manual and automated builds work again. However it seems that @analogic made it work without recreating the repository and just refreshing the access keys - however I recall doing just that and still no go. So it seems that there might be multiple ways to tackle a seemingly similar issue. However, without better logs from Docker Cloud, we can’t really pinpoint what went wrong and what we’re fixing.
I guess that bitbucket don’t accept old key anymore (dsa?) or docker cloud started using new keys and forgot push public key to bitbucket. Anyway I agree that logs are not very helpful
I have same problem, autobuild stopped working again. Now it seems that docker cloud bitbucket ssh key management is broken. Creating custom key and pasting it to SSH_PRIVATE and bitbucket should work
A little help please, I tried copy pasting the Access Key of Bitbucket as a value of SSH_PRIVATE but the build failed. The message is:
Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '104.192.143.2' 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.
please ensure the correct public key is added to the list of trusted keys for this repository (128)
PS: The value came from the created ACCESS KEY from my first trigger build coming from Docker Cloud
Try to follow the instructions listed in @analogic comment a little further up this post. If that doesn’t work, create a whole new repository just for testing, connect it to the same BitBucket repository, set up the automated builds and test it out. If that works, I’m afraid you’re going to have to do the same thing I did; i.e. moving onto a new repository.
can you maybe explain in more detail what you did? It only seemed to work for me one time and I had to do it all over again
@analogic is your automated builds still working? Did you end up creating a custom access key for the repo and using that public key in your SSH_PRIVATE environment variable in docker?