frerich

frerich

Using Dependabot with private Hex repository

Hi,

we’re running a private Hex repository which uses HTTP Basic authentication to verify users. The repository is a plain S3 bucket behind a CloudFront function which takes care of authentication. It works great, both via Mix as well as raw cURL calls.

Now I’m trying to get Dependabot working. I used the dependabot.yml example at Configuring Dependabot — Oban Pro v1.4.14 as an example and merely adjusted the repo name, URL, auth-key and public-key-fingerprint:

version: 2

registries:
  betterdoc-private-repo:
    type: hex-repository
    repo: betterdoc
    url: https://hexrepo.betterdoc.org
    auth-key: ${{ secrets.HEX_REPO_AUTH_KEY }}
    public-key-fingerprint: "SHA256:w9Qm2VfDiSbcN8dCUFPZqOP0HZfMqmnXAdUDBkkUkxk"

updates:
  - package-ecosystem: "mix"
    directory: "/"
    insecure-external-code-execution: "allow"
    registries:
      - betterdoc-private-repo
    schedule:
      interval: "daily"

Alas, Dependabot fails to authenticate when trying to fetch packages from the private repository. In the HTTP logs of the Hex repository I can see that all requests come with an empty authorization header (when instead it should be something like authorization: Basic ....). The GitHub secret for the auth-key value is setup correctly though.

I started digging through GitHub - dependabot/dependabot-core: 🤖 Dependabot's core logic for creating update PRs. · GitHub to see if there’s something odd, but noticed nothing obviously problematic.

Maybe anyone here succeeded in setting up a private Hex repository and using it with Dependabot and has some thoughts on what I could try? Any ideas would be much appreciated. :hugs:

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement