5
submitted 1 year ago* (last edited 1 year ago) by TheButtonJustSpins@infosec.pub to c/selfhost@lemmy.ml

I used to have this working, but I haven't used it in a while and had to rebuild the server in between, and now it doesn't. How do you set up the PAT in the URL in order to access private repos when building using docker compose?

build: 'https://PAT@github.com/username/repo.git#branch' is what I'm trying to use, but I get:

failed to solve: failed to read downloaded context: failed to load cache key: invalid response status 404

EDIT: See comment for (silly) resolution. The above works.

top 3 comments
sorted by: hot top controversial new old
[-] TheButtonJustSpins@infosec.pub 2 points 1 year ago

I'm an idiot and can't read. There are two services in the compose file and it was the other one that was throwing the error, and that was because I forgot the .git.

[-] terribleplan@lemmy.nrd.li 1 points 1 year ago

Pretty sure it needs to be https://$user:$pat@github.com/username/repo.git#branch.

[-] TheButtonJustSpins@infosec.pub 1 points 1 year ago

Same behavior if I add the username: before the PAT.

this post was submitted on 17 Jul 2023
5 points (100.0% liked)

Self Hosted - Self-hosting your services.

11401 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS