mirror of https://github.com/certd/certd
chore: 1
parent
6ee4dc165b
commit
54ad09f755
|
@ -22,7 +22,7 @@ export class SshClient {
|
||||||
uploadFiles(options: { connectConf: ConnectConfig; transports: any }) {
|
uploadFiles(options: { connectConf: ConnectConfig; transports: any }) {
|
||||||
const { connectConf, transports } = options;
|
const { connectConf, transports } = options;
|
||||||
const conn = new ssh2.Client();
|
const conn = new ssh2.Client();
|
||||||
|
this.logger.info('开始连接服务器');
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
conn
|
conn
|
||||||
.on('ready', () => {
|
.on('ready', () => {
|
||||||
|
|
|
@ -111,7 +111,7 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||||
if (!accessId) {
|
if (!accessId) {
|
||||||
throw new Error('主机登录授权配置不能为空');
|
throw new Error('主机登录授权配置不能为空');
|
||||||
}
|
}
|
||||||
this.logger.info('开始连接服务器');
|
this.logger.info('准备上传到服务器');
|
||||||
const connectConf = await this.accessService.getById(accessId);
|
const connectConf = await this.accessService.getById(accessId);
|
||||||
const sshClient = new SshClient(this.logger);
|
const sshClient = new SshClient(this.logger);
|
||||||
await sshClient.uploadFiles({
|
await sshClient.uploadFiles({
|
||||||
|
|
Loading…
Reference in New Issue