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

ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement