{"record":{"id":"15a0f0b46ec90dae","repo":"Tencent/matrix","slug":"no-signing-configurations","errorCode":null,"errorMessage":"No signing configurations.","messagePattern":"No signing configurations\\.","errorType":"console","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/gradle/bintray-to-maven-central.gradle","lineNumber":127,"sourceCode":"    Properties properties = new Properties()\n    try {\n        properties.load(project.rootProject.file('local.properties').newDataInputStream())\n    } catch (Exception e) {\n        println(\"load local properties failed msg:${e.message}\")\n    }\n    return properties.getProperty(key)\n}\n\ndef getRepositoryUsername() {\n    return hasProperty('REPOSITORY_USERNAME') ? REPOSITORY_USERNAME : readPropertyFromLocalProperties('REPOSITORY_USERNAME')\n}\n\ndef getRepositoryPassword() {\n    return hasProperty('REPOSITORY_PASSWORD') ? REPOSITORY_PASSWORD : readPropertyFromLocalProperties('REPOSITORY_PASSWORD')\n}\n\nif (!project.hasProperty(\"signing.keyId\")) {\n    throw new RuntimeException(\"No signing configurations.\")\n}\n\next.transmition_tasks = [:]\n\n// Declare publications\npublishing.publications {\n\n    (bintray_saving_dir as File).listFiles().each { component_file ->\n        transmition_tasks[component_file.name] = [] as Set\n\n        if (target_components != null && component_file.name != target_components) {\n            return\n        }\n\n        component_file.listFiles().each { version_file ->\n            if (!version_file.isDirectory()) {\n                return\n            }","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/gradle/bintray-to-maven-central.gradle#L109-L145","documentation":"bintray-to-maven-central.gradle signs artifacts for Maven Central and requires GPG signing properties (signing.keyId plus secret key/passphrase) to be present. If the project has no 'signing.keyId' property at configuration time, it throws a RuntimeException because unsigned artifacts cannot be published to Maven Central.","triggerScenarios":"Running a publish task from bintray-to-maven-central.gradle without -Psigning.keyId (and typically signing.password / signing.secretKeyRingFile) on the command line, gradle.properties, or local.properties.","commonSituations":"New contributor running ./gradlew publish locally without GPG setup, CI secrets not injected, or properties defined in ~/.gradle/gradle.properties of a different user.","solutions":["Pass signing properties: ./gradlew publish -Psigning.keyId=YOURKEYID -Psigning.password=... -Psigning.secretKeyRingFile=/path/to/secring.gpg","Add signing.keyId etc. to ~/.gradle/gradle.properties or the project's gradle.properties (do not commit secrets; use CI secrets)","Generate a GPG key first (gpg --gen-key) and export the secret key ring if you don't have one","If you only intend Bintray/local publishing, don't apply bintray-to-maven-central.gradle"],"exampleFix":"// before\n./gradlew publishToMavenCentral\n\n// after\n./gradlew publishToMavenCentral -Psigning.keyId=ABCDEF01 -Psigning.password=\"$SIGNING_PASS\" -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg","handlingStrategy":"validation","validationCode":"// pre-publish check script\nif (!project.hasProperty('signing.keyId')) {\n    throw new GradleException('Provide -Psigning.keyId (and signing.password, signing.secretKeyRingFile) for Maven Central publishing')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set up GPG keys once per machine and document the required -P properties","Inject signing properties as CI secrets into gradle.properties at build time","Never commit signing passwords to the repo","Run a signing dry-run (gradle signMavenPublication) before releases"],"tags":["gradle","signing","gpg","publishing"],"backgroundTag":"missing-credentials","analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}