Remotecfg in alloy not working with github endpoint

am trying to include an alloy config file using remotecfg i am getting error Error: could not perform the initial load successfully

When tried with curl i am able to get the result
curl -u lijin-jayan:$(cat /etc/github_pass) https://raw.githubusercontent.com/company/tse-alloy-backup/blob/main/server01/app.alloy

Able to get the output successfully. However when i am trying to place in remotecfg its failing.

remotecfg {
    url = "https://github.com/company/tse-alloy-backup/blob/main/server01/app.alloy"
    basic_auth {
        username      = "lijin-jayan"
        password_file = "/etc/github_pass"
    }
    poll_frequency = "5m"
}

Note: The alloy config file is valid since i have tried to run it by placing in server its working fine .

I don’t use GitHub for remotecfg myself, so can’t give you an exact answer. But you are using different URLs from test and remotecfg, is that a reason for this?

We use remote.s3 plus import.string for our remote configurations. They are pre-populated and placed on an S3 bucket.

Hi Tony, do you have details of this config, remotecfg using remote.s3?

Hi, did you get anywhere with Github? We are trying to do something similar with Bitbucket…

Here is a quick example:

remote.s3 "imported_config" {
  path           = "{S3_path}"
  poll_frequency = "10m"

  client {
    region = "{aws_region}"
  }
}

import.string "imported_config_string" {
  content = remote.s3.imported_config.content
}