Gradle 'GitHubPackages' 个凭据缺少属性

Gradle properties are missing for 'GitHubPackages' credentials

我正在尝试在 IntelliJ idea 中构建我的 spring 引导项目,但出现以下错误。我正在使用 Gradle 构建项目。

Caused by: org.gradle.api.internal.provider.MissingValueException: The following Gradle properties are missing for 'GitHubPackages' credentials:
  - GitHubPackagesUsername
  - GitHubPackagesPassword
    at org.gradle.api.internal.provider.CredentialsProviderFactory$CredentialsProvider.assertRequiredValuesPresent(CredentialsProviderFactory.java:119)
    at org.gradle.api.internal.provider.CredentialsProviderFactory$PasswordCredentialsProvider.call(CredentialsProviderFactory.java:138)

添加包含以下属性的 gradle.properties 文件

GitHubPackagesUsername=yourUsername
GitHubPackagesPassword=tokenId

并将其保存在 .gradle 文件夹中