• go get: Add a module from a private GitHub repository

    2 min read

    GitHub private repository go get

    If you try to add a golang module that is on a private repository you'll get an error similar to this:

    $ go get github.com/pet2cattle/golang-demo
    go: downloading github.com/pet2cattle/golang-demo v0.0.0-20220925191817-0b4b7026fa7f
    go: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: verifying module: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: reading https://sum.golang.org/lookup/github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: 404 Not Found
            server response:
            not found: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/75d68059a7355b978972dea177e930262ce90abe410680b8db8a45a587e02c26: exit status 128:
                    fatal: could not read Username for 'https://github.com': terminal prompts disabled
            Confirm the import path was entered correctly.
            If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
    

    26/09/2022

    Read more...
  • How to retrieve a github actions secret

    2 min read

    github action get secret

    When using Github Actions secrets, it won't show any secrets on the action's logs: It is going to replace any string that matches with an existing secret with ***

    24/08/2022

    Read more...
  • Add a github action to generate documentation using mkdocs

    3 min read

    python mkdocs github action

    If you have a tool that uses the python's click module for building a command line interface. Using mkdocs and mkdocs-click we can automatically generate documentation for it

    14/06/2022

    Read more...
  • Update a different repository using a github action

    2 min read

    When building an application we might like to update a different repository to update the app's versions number. For example, if we build a docker containter using a github action we might want to update the tag on the helm repository. This is by default restricted: a github action only has access to it's own repository but we can create a PAT to workaround this problem

    29/10/2021

    Read more...
  • Return HTTP status codes based on an arbitrary script

    3 min read

    Sometimes we need a way of telling using a HTTP endpoint the readiness of the service but the service does not provide any of this: For example, a MySQL replica that we need to get in and out of the pool depending on how lagged it is, or a worker node that we want to remove from that pool depending on it's CPU usage...

    If we have a command that will tell us whether the service is ready to accept connections, we can use healthcheckd to create a HTTP endpoint to publish it.

    27/10/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets