Gradle push to maven center repo

I want pushed to maven center repo , I refer to it : https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:complete_example.
I exec publishToMavenLocal console print


Execution failed for task ':signMavenJavaPublication'.
> path may not be null or empty string. path=''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.