Skip to content

πŸ–οΈ Load Dagger module from private Github repository via PAT auth.Β #7990

Closed

Description

@zhaopengdirk

What happened? What did you expect to happen?

We tried to load Dagger module from our private Github repository but failed. We'd like to know whether this capability supported now? Or is there any plan to support this in the future? By the way, our company only allows PAT auth to do this.

Activity

  1. grouville commented on Jul 19, 2024

    @grouville
    Member

    Hey πŸ‘‹ It's coming here: #7708

  2. changed the title [-]Load Dagger module from private Github repositoryπŸ–οΈ <title>[/-] [+]πŸ–οΈ Load Dagger module from private Github repository[/+] on Jul 19, 2024
  3. Jim-ent commented on Jul 22, 2024

    @Jim-ent

    I am looking for the same feature. @grouville #7708 seems only for ssh auth, any plans for https+PAT token?

  4. changed the title [-]πŸ–οΈ Load Dagger module from private Github repository[/-] [+]πŸ–οΈ Load Dagger module from private Github repository via PAT auth.[/+] on Jul 24, 2024
  5. grouville commented on Aug 4, 2024

    @grouville
    Member

    I am looking for the same feature. @grouville #7708 seems only for ssh auth, any plans for https+PAT token?

    Hello everyone πŸ‘‹

    I am starting to implement it. Would mounting the .netrc from the host be a nice solution for your use-case ? cc @nipuna-perera

    There is also a path to supporting git credential manager but is going to be a bit more work. Would the netrc file be a nice stopgap ? I am trying to estimate all the use-cases / potential DX that could be occuring

  6. nipuna-perera commented on Aug 4, 2024

    @nipuna-perera
    Contributor

    I am looking for the same feature. @grouville #7708 seems only for ssh auth, any plans for https+PAT token?

    Hello everyone πŸ‘‹

    I am starting to implement it. Would mounting the .netrc from the host be a nice solution for your use-case ? cc @nipuna-perera

    There is also a path to supporting git credential manager but is going to be a bit more work. Would the netrc file be a nice stopgap ? I am trying to estimate all the use-cases / potential DX that could be occuring

    I have not used .netrc for git auth. When you say mount, do you mean an automatic mount of the global netrc? If so, is there a chance that could mess with other local settings? I am afraid it will add additional work for consumers. I would love to have support for GCM as that's one of the ways we get everyone to set up for git.

    One example of a very smooth integration I've seen so far is how devcontainers handle transferring git auth into the container if you want to take inspiration.

    I am out on vacation this week so apologies in advance if I'm not responding timely. But I am very excited this is finally being worked on!

  7. grouville commented on Aug 4, 2024

    @grouville
    Member

    One example of a very smooth integration I've seen so far is how devcontainers handle transferring git auth into the container if you want to take inspiration.

    Thank you for the feedback πŸ™ I'll definitely take a look. That's exactly what I needed πŸ‘Œ

  8. Jim-ent commented on Aug 9, 2024

    @Jim-ent

    I prefer credential manager as well since that's what I saw most path developers in my group applied.

  9. cndoit18 commented on Sep 13, 2024

    @cndoit18

    Hi, any updates?

  10. grouville commented on Sep 19, 2024

    @grouville
    Member

    Hi, any updates?

    Hi @cndoit18,
    I am currently on it. I had to fix a few bugs regarding the SSH support and now I am free to allocate on my time on this πŸ™

  11. sheldonhull commented on Sep 24, 2024

    @sheldonhull

    In my case, it's private azure devops repos. So for many folks they'd get an oauth SSO from microsoft and that would do it. Ideally no PAT input required, so it uses just the credential provider and can allow the oauth browser to open if a user is running it directly too. Just mentioning this for some context as you pointed me to this from discord message link

  12. grouville commented on Sep 26, 2024

    @grouville
    Member

    In my case, it's private azure devops repos. So for many folks they'd get an oauth SSO from microsoft and that would do it. Ideally no PAT input required, so it uses just the credential provider and can allow the oauth browser to open if a user is running it directly too. Just mentioning this for some context as you pointed me to this from discord message link

    Hey @sheldonhull, thanks for the feedback πŸ™ Ok, so an oauth SSO from microsoft. This should be supported when relying on the git-credential-manager standard. Do you all authenticate using SSO when using git ? Or at least, does it trigger the auth step when cloning ?

  13. sheldonhull commented on Sep 27, 2024

    @sheldonhull

    In my case, it's private azure devops repos. So for many folks they'd get an oauth SSO from microsoft and that would do it. Ideally no PAT input required, so it uses just the credential provider and can allow the oauth browser to open if a user is running it directly too. Just mentioning this for some context as you pointed me to this from discord message link

    Hey @sheldonhull, thanks for the feedback πŸ™ Ok, so an oauth SSO from microsoft. This should be supported when relying on the git-credential-manager standard. Do you all authenticate using SSO when using git ? Or at least, does it trigger the auth step when cloning ?

    Trying to do this without using hardcoded name:token in the string.

    https://learn.microsoft.com/en-us/azure/devops/repos/git/set-up-credential-managers?view=azure-devops

    dagger functions -m dev.azure.com/MYORG/MYREPO/_git/daggerverse.git/tf-yolo@main
    βœ” connect 0.4s
    ✘ initialize 0.5s
    ! failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote https://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git: git error: exit status 128
      ✘ resolving module ref 0.5s
      ! failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote https://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git: git error: exit status 128
        ✘ moduleSource(refString: "dev.azure.com/MYORG/MYREPO/_git/daggerverse.git/tf-yolo@main"): ModuleSource! 0.4s
        ! failed to resolve git src to commit: failed to load cache key: failed to fetch remote https://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git: git error: exit status 128
          ✘ cache request: git://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git#main 0.4s
          ! failed to fetch remote https://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git: git error: exit status 128
    
    Error: failed to get configured module: failed to get module ref kind: input: moduleSource resolve: failed to resolve git src to commit: failed to load cache key: failed to fetch remote https://dev.azure.com/MYORG/MYREPO/_git/daggerverse.git: git error: exit status 128
    stderr:
    fatal: could not read Username for 'https://dev.azure.com': terminal prompts disabled
    
    

    So i've tried variations. The credential provider does support an oauth workflow so if that's possible let me know

  14. sheldonhull commented on Oct 15, 2024

    @sheldonhull

    following up. Is this still in the works @grouville? cheers

  15. grouville commented on Oct 16, 2024

    @grouville
    Member

    following up. Is this still in the works @grouville? cheers

    Hello @sheldonhull,
    Thanks for the ping πŸ™ I have a working prototype now. I am slicing everything in a few PRs that will come along this week πŸ‘Ό

  16. sheldonhull commented on Oct 25, 2024

    @sheldonhull

    Following up. I can't use dagger to try more work without private http support so looking forward to seeing it this solve some issues for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions