简体   繁体   中英

How can I use gradle uploadArchive with other ssh port?

I'm using gradle to upload my package to my ssh server.

it like gradle offical guide:

uploadArchives {
    repositories  {
        mavenDeployer {
            configuration = configurations.deployerJars
            repository(url: "scp://repos.xxx.com/release") {
                authentication(userName: "maven", password: "maven")
            }
            pom.groupId = 'com.xxx'
        }

    }
}

But my ssh'port is not 22, and I can't find the port configuration.

I change the url to 'scp://repos:2233/release', it not work.

I check the wagon-ssh source and not found the port config, so I think the only config position is the url.

But I dont know how to config it.

Thanks for help.

I know where the problem is, when I execute the uploadArchives command, the SSH will be asked to save authentication information for the first time, but this is covered with gradle output.

I see it When I add --info to the cmd, and input the yes , the process can continue.

Change port is simple: scp://repos.xxx.com:1234/release

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM