首页 > 解决方案 > HTTP/1.1 401 Unauthorized to upload my module kotlin to jcenter using bintray

问题描述

我快疯了......我正在尝试使用 Bintray 将我的 kotlin 模块上传到 JCenter。我使用在互联网上找到的 gradle 脚本这是我的错误

任务“:bintrayPublish”执行失败。无法发布“drivesmart/DriveSmart_SDK/com.drivesmartsdk/0.0.1”:HTTP/1.1 401 Unauthorized [消息:此资源需要身份验证]

Gradle 项目

     classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
     classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"

摇篮模块

apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
ext {
bintrayRepo = 'DriveSmart_SDK' // Repo name in bintray dashboard
bintrayName = 'com.drivesmartsdk' // package name of the bintray repo
userOrganisation = 'drivesmart'

publishedGroupId = 'com.drivesmartsdk'   // this is the ID we want to see in implementation line
libraryName = 'drivesmartsdk'     // this is the module name of library
artifact = 'drivesmartsdk'        // this is the artifact we want to see in implementation line

libraryDescription = 'SDK to collect data' // description of library

siteUrl = ''    // git repo url
gitUrl = '' // git repo vcs url

libraryVersion = '0.0.1'      // library version

developerId = 'andreslachica10'                // This is your bintray username
developerName = ''              // Developer's name
developerEmail = ''                // Developer's email

licenseName = 'The Apache Software License, Version 2.0'  // for example, The Apache Software License, Version 2.0
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'   // for example, http://www.apache.org/licenses/LICENSE-2.0.txt
allLicenses = ["Apache-2.0"]    // array of licenses, for example, ["Apache-2.0"]

}

我的组织 在此处输入图像描述

标签: mavenkotlinbintrayjcenter

解决方案


推荐阅读