How to develop custom modules for Odoo.sh with private repositories

697 Views Asked by At

I have developed a custom module for Odoo.sh and plan to develop more. I would like each module to have its own (private) Github repository so I am trying to add the module to my Odoo.sh project as a submodule as described here. I am able to add the repository to the project as a submodule if I make it public but I want to use private repos.

The documentation states that private submodules cannot be added from the Odoo.sh interface but can be added using Git on the local machine. So I have followed the instructions to add the submodule to my local project using Git and have pushed the repository with the submodule to Odoo.sh. Then I see the following status in the Odoo.sh Branches page:

Build Error

There is nothing in the log. I am finding it very difficult to figure out a practical workflow for developing private modules for deployment to Odoo.sh. Any suggestions and/or references would be welcome.

1

There are 1 best solutions below

0
On

Have you set a deploy key for your private repo as described here

When a repository is private, it is not possible to publicly download its branches and revisions. For that reason, you need to configure a deploy key for Odoo.sh, so the remote Git server allows our platform to download the revisions of this private repository.

To configure the deploy key for a private repository, proceed as follows:

  • in the input, paste the SSH URL of your private sub-repository and click on Add,
    • e.g. [email protected]:USERNAME/REPOSITORY.git
    • it can be another Git server than Github, such as Bitbucket, Gitlab or even your own self-hosted server
  • copy the public key,
    • it should look like ssh-rsa some…random…characters…here…==
  • in the settings of the private sub-repository, add the public key amongst the deploy keys.
    • Github.com: Settings ‣ Deploy keys ‣ Add deploy key
    • Bitbucket.com: Settings ‣ Access keys ‣ Add key
    • Gitlab.com: Settings ‣ Repository ‣ Deploy Keys
    • Self-hosted: append the key to the git user’s authorized_keys file in its .ssh directory