$ cat coding.pub
Host git.coding.net User xxxx@email.com PreferredAuthentications publickey IdentityFile ~/.ssh/coding_rsa // 生成的非默认地址的公钥存放点
# 注意 git.coding.net 接入到 CDN 上所以会解析多个不同的 host ip $ ssh -T git@git.coding.net The authenticity of host 'git.coding.net (123.59.85.184)' can't be established. RSA key fingerprint is 98:ab:2b:30:60:00:82:86:bb:85:db:87:22:c4:4f:b1. Are you sure you want to continue connecting (yes/no)? # 这里我们根据提示输入 yes Warning: Permanently added 'git.coding.net,123.59.85.184' (RSA) to the list of known hosts. Coding 提示: Hello duoli, You've connected to Coding.net via SSH. This is a deploy key. duoli,你好,你已经通过 SSH 协议认证 Coding.net 服务,这是一个部署公钥
<?php
namespace AppJobs;
use IlluminateContractsBusSelfHandling;
use IlluminateContractsQueueShouldQueue;
use SymfonyComponentProcessProcess;
class WebDeploy extends Job implements SelfHandling, ShouldQueue
{
private $shellPath;
/**
* Create a new job instance.
*/
public function __construct()
{
$this->shellPath = dirname(dirname(__DIR__));
}
/**
* Execute the job.
* @return void
*/
public function handle()
{
if (!env('LM_DEPLOY_BRANCH')) {
echo 'ERR > ' . 'No branch Set'."n";
}
$shell = "/bin/bash " . base_path('resources/shell/deploy.sh') . ' ' . base_path() . ' ' . env('LM_DEPLOY_BRANCH', 'master');
$process = new Process($shell);
$process->start();
$process->wait(function ($type, $buffer) {
if (Process::ERR === $type) {
echo 'ERR > ' . $buffer;
}
else {
echo 'OUT > ' . $buffer;
}
});
}
}
dispatch(new WebDeploy());
#!/bin/bash
aim_path=$1
branch=$2
cd ${aim_path}
echo $PWD
/usr/bin/git pull origin ${branch} >/dev/null 2>&1
if [ $? -eq 0 ];then
echo "OK"
else
/usr/bin/git fetch -f
/usr/bin/git reset --hard
/usr/bin/git pull origin ${branch}
fi
[program:project_name] process_name=%(program_name)s_%(process_num)02d command=php /path/to/project/artisan queue:work --sleep=3 --tries=3 --daemon autostart=true autorestart=true user=apache numprocs=1 redirect_stderr=true stdout_logfile=/webdata/logs/project.log environment=QUEUE_DRIVER=database
OUT > /webdata/www/sour-lemon.com ERR > Could not create directory '/usr/share/httpd/.ssh'. ERR > Host key verification failed. ERR > fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
# 之前是 /sbin/nologin apache:x:48:48:Apache:/usr/share/httpd:/bin/bash
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有