Private repositories fail to check
See original GitHub issueIs 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:
- Created 3 years ago
- Reactions:4
- Comments:10
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
This would be a good improvement for private jitpack repositories.