question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Private repositories fail to check

See original GitHub issue

Is your feature request related to a problem? Please describe. Both gradle sync and refreshVersions fail with 401 when using private repositories. It would be great if they were capable of looking into them.

We have declared on the root gradle the company private repositories like usual:

allprojects {
    repositories {
        maven {
            name = "FooBar"
            url = uri("https://maven.pkg.github.com/<owner>/<repo-name>")
            credentials {
                username = localProperties["github.user"] as String? ?: System.getenv("GH_USER")
                password = localProperties["github.access_token"] as String?
                    ?: System.getenv("GH_ACCESS_TOKEN")
            }
        }

but making those dependencies with the underline _ simply crashes the sync task

Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
ModuleId(group=<group>, name=<artifact>) not found. Searched the following repositories:
- https://dl.google.com/dl/android/maven2/
- https://maven.pkg.github.com/<owner>/<repo-name>/
- https://repo.maven.apache.org/maven2/
- https://jcenter.bintray.com/

and when running ./gradlew refreshVersions we get 401.

<-- 401 Unauthorized https://maven.pkg.github.com/<owner>/<repo-name>/<package-name>/maven-metadata.xml (113ms, 0-byte body)

Describe the solution you’d like The tasks use the provided credentials to properly authenticate with the repos.

Describe alternatives you’ve considered We’re just hardcoding versions now on the buildSrc

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:10

github_iconTop GitHub Comments

2reactions
LouisCADcommented, Aug 12, 2021

I suggest that you hardcode the version for these private dependencies, because investigating that issue further is not in our current priorities. I’m reopening this issue so we remember to take it into consideration.

0reactions
gunesscommented, Oct 6, 2021

This would be a good improvement for private jitpack repositories.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Private repositories on github are not detected · Issue #129758
Cloning a private repository does not work: Only public repositories are available in the dropdown...private repos don't seem to be discovered.
Read more >
git: 'Repository not found error' for private repository on Github
Github does not support connections via HTTPS to private repositories, if you do not supply the correct credentials.
Read more >
GitHub Actions can't access private repos? Here's how to fix it
Cargo can't check out my private repository! This happens because the user on your dev machine is usually associated with a particular GitHub...
Read more >
Troubleshooting pull requests from fork of private repository ...
Pull requests from forks of your private repository are failing at the checkout step with an error message as shown below.
Read more >
Error when trying to push/mirror Gitlab private Project to ...
Enter URL for the private GitHub repo; Enter Access Token in the Password field. Click on “Mirror repository” and then “Update now”. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found