2

My Github account is private. I'm trying to create a dependency in Jitpack of my github repo project. But its throwing "No read access to repo" error. Can anyone help me to fix this.

https://i.stack.imgur.com/Y12ds.png

Imran
  • 21
  • 1
  • 4

2 Answers2

6

According to the JitPack website, in order to use private repositories via JitPack, you need to authorize JitPack on GitHub and add your token into $HOME/.gradle/gradle.properties in the following format:

authToken=AUTHENTICATION_TOKEN

Then use authToken as the username in your build.gradle file:

allprojects {
    repositories {
        maven {
            url "https://jitpack.io"
            credentials { username authToken }
        }
    }
 }
Piotr Wittchen
  • 3,853
  • 4
  • 26
  • 39
  • Thannks for your response, Can't able to access my repo for building the dependency. Once it build successfully then we need auth token to access that dependency. – Imran Aug 01 '18 at 12:29
0

Refer this link for granting read access to your Github/Bitbucket/Gitlab private repositories : https://jitpack.io/docs/PRIVATE/#set-up

For reference:

To start using private repositories you will first need to grant JitPack access. Open https://jitpack.io/private and follow the steps:

  1. Click Authorize to get your personal authentication token. Each member of your team should to get their own token.
  2. Add the token to $HOME/.gradle/gradle.properties:

authToken=AUTHENTICATION_TOKEN

  1. Then use authToken as the username in your build.gradle:

repositories { maven { url "https://jitpack.io" credentials { username authToken } } }

pravingaikwad07
  • 482
  • 1
  • 7
  • 24