Symptom
The build reaches the Market Pay Maven repository but fails to download the SDK with a 401 Unauthorized. The repository is clearly reachable — the failure is about credentials, not connectivity.
Cause
The Market Pay Maven repository requires authentication. A 401 means the credentials Gradle sent were missing, wrong, or not picked up — as opposed to the insecure-protocol error, which is about the repository being HTTP.
Fix
Confirm your credentials exist in your global Gradle properties file,
~/.gradle/gradle.properties(keeping them out of the repo):MAVEN_LOGIN=your_login MAVEN_PASSWORD=your_passwordConfirm the repository blocks in
settings.gradleactually reference those properties:credentials { username "$MAVEN_LOGIN" password "$MAVEN_PASSWORD" }Confirm the values are exactly the ones Market Pay issued — no stray spaces, no placeholder left in. If you're unsure the credentials are valid, that's the thing to verify with Market Pay.
Verify
Re-sync. The dependency pl.novelpay.sdk:client-client:1.3.2 should resolve. If the error changes to an insecure-protocol message, fix that next — see Troubleshooting: Gradle insecure HTTP.
A note on credential hygiene
Keep credentials in ~/.gradle/gradle.properties, never committed in the project. If a credential is ever pasted somewhere shared or committed by accident, treat it as exposed and have it rotated.
Related
- Quickstart — step 1 sets up credentials correctly.
- Troubleshooting: Gradle insecure HTTP — the other repository-setup error.