#Remote Repositories | Dagger
1 messages ยท Page 1 of 1 (latest)
I ran into this with @viral frigate in github actions. I think the solution in that case was to use a PAT. Are you hitting this locally @fallen pebble ?
Hey, can you please show the code snippet and how you're calling it ๐
dagger call git-env --github-token=env:GITHUB_TOKEN --repo=https://github.com/myorg/myrepo#pull/123/head
where repo is type Directory
Ah thanks ๐ So it should indeed be resolved automatically, what's the use of the --github-token though ? Is it for a publish ?
yeah, it works fine with public repos
unrelated the repo clone: for use of the gh cli inside of the dagger functions
Can you please cehck that you have the correct info with: echo -e "protocol=https\nhost=github.com\n" | git credential fill
especially the password
what should i see? it asks for username/password
ok so it seems that your credential helper is not configured entirely:
echo -e "protocol=https\nhost=github.com\n" | git credential fill
protocol=https
host=github.com
username=****
password=*****
git is a beast, and the gh cli and git cli uses a lot of auth protocols and fallbacks-- Let me check the command ๐
can you please do : gh auth setup-git and try again the command above
my git config has
[credential]
helper = osxkeychain
fwiw (checking gh auth now)
credential fill shows my username and a pat now
try again, it should work
yep
I truly need to improve the error message to a docs link explaining that -- it's very host specific
keep me in touch ๐
sheessh, how do i get it to give me an appropriate token? the gh cli is authed with my org
ok, github docs to the rescue https://docs.github.com/en/get-started/git-basics/updating-credentials-from-the-macos-keychain