This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Description Keep getting "Authentication is required but no CredentialsProvider has been registered"
Using: org.ajoberstar:gradle-git:1.4.0-rc.1
task tagRelease << {
// Get git username & password from gradle.properties system properties. (systemProp.gitUser / systemProp.gitPass)
def user = System.getProperty("gitUser", "")
def pass = System.getProperty("gitPass", "")
def credentials = new Credentials(user, pass)
def grgit = Grgit.open(project.file('..'), credentials)
grgit.tag.add {
name = android.defaultConfig.versionName
message = "Release of ${android.defaultConfig.versionName}"
}
def pushCmd = grgit.repository.jgit.push()
result = pushCmd.call()
result.each { item ->
println item
}
}
Also have the following in gradle.properties
systemProp.org.ajoberstar.grgit.auth.hardcoded.allow=true
systemProp.org.ajoberstar.grgit.auth.username="******"
systemProp.org.ajoberstar.grgit.auth.password="******"
The following furnished the same error:
./gradlew -Prelease.scope=major -Prelease.stage=rc tagRelease -Dorg.ajoberstar.grgit.auth.force=hardcoded
Pushing from CLI works fine:
def cmd = "git push origin " + android.defaultConfig.versionName
def proc = cmd.execute()
proc.waitFor()
println proc.in.text.trim()
Reactions are currently unavailable
Keep getting "Authentication is required but no CredentialsProvider has been registered"
Using: org.ajoberstar:gradle-git:1.4.0-rc.1
Also have the following in gradle.properties
The following furnished the same error:
Pushing from CLI works fine: