Using lib from Github-Packages #2459
              
  
  Closed
              
          
                  
                    
                      wahtique
                    
                  
                
                  started this conversation in
                Using directives and cmd configuration options
              
            Replies: 1 comment
-
| Forget it I found the working combination : 
 Works like a charm. See this too #1629 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I am looking for a working example of an import of a package from Github Packages Maven repository using scala-cli.
My use case would be to import libs shared internally in my company org which involves passing a Github token as credentials.
Currently I have :
scala-cli config --dump{ "repositories": { "credentials": [{"host":"https://maven.pkg.github.com/MY_ORG","user":"value:PrivateToken","password":"env:GITHUB_TOKEN","matchHost":true}] } }and the following using directives
which yields an
unauthorizederror on import.I also tried setting the
repositories.credential.hosttomaven.pkg.github.comandmaven.pkg.github.com/MY_ORGwithout success.As for the repository in the
usingdirective I have also tried ( not sure if I tried every combination of both ):https://maven.pkg.github.com/MY_ORG/_https://maven.pkg.github.com/MY_ORG/REPO_OF_MY_LIBI am sure the token works. The
unauthorizederror seem to indicate either the crednetials are not passed or I am targeting the wrong URLs. Any idea on what's wrong with my setup ?Beta Was this translation helpful? Give feedback.
All reactions