gitea配置问题修复,nginx调用证书可能没有安装acme的问题
This commit is contained in:
parent
778fb6ec59
commit
015923acd8
@ -11,6 +11,8 @@ declare port=$2
|
|||||||
sudo useradd -m git
|
sudo useradd -m git
|
||||||
sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" -f /home/git/.ssh/id_rsa -N ""
|
sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" -f /home/git/.ssh/id_rsa -N ""
|
||||||
sudo -u git sh -c 'cat /home/git/.ssh/id_rsa.pub >> /home/git/.ssh/authorized_keys'
|
sudo -u git sh -c 'cat /home/git/.ssh/id_rsa.pub >> /home/git/.ssh/authorized_keys'
|
||||||
|
sudo -u git sh -c 'chmod a+x /usr/local/bin/gitea'
|
||||||
|
sudo -u git sh -c 'echo "ssh -p '$(( port+22 ))' -o StrictHostKeyChecking=no git@127.0.0.1 \"SSH_ORIGINAL_COMMAND=\\\"\$SSH_ORIGINAL_COMMAND\\\" \$0 \$@\"" > /usr/local/bin/gitea'
|
||||||
declare uid=$( id git | awk -F'[=() ]+' '{print $2}' )
|
declare uid=$( id git | awk -F'[=() ]+' '{print $2}' )
|
||||||
declare gid=$( id git | awk -F'[=() ]+' '{print $5}' )
|
declare gid=$( id git | awk -F'[=() ]+' '{print $5}' )
|
||||||
|
|
||||||
@ -60,5 +62,3 @@ EOF
|
|||||||
chown -R git:git $path
|
chown -R git:git $path
|
||||||
sudo docker compose up -d
|
sudo docker compose up -d
|
||||||
|
|
||||||
sudo -u git ssh -p $(( port+22 )) -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ if [[ $pick == 2 ]]; then
|
|||||||
else
|
else
|
||||||
echo "1.nginx(默认)"
|
echo "1.nginx(默认)"
|
||||||
read -p "请选择:" pick
|
read -p "请选择:" pick
|
||||||
|
bash "$(dirname $(dirname $0))/acme/test.sh"
|
||||||
bash "$(dirname $(dirname $0))/acme/apply.sh" "nginx" "${domain}"
|
bash "$(dirname $(dirname $0))/acme/apply.sh" "nginx" "${domain}"
|
||||||
ssl_certificate="${HOME}/.acme.sh/${ssl_domain}_ecc/fullchain.cer"
|
ssl_certificate="${HOME}/.acme.sh/${ssl_domain}_ecc/fullchain.cer"
|
||||||
ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key"
|
ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key"
|
||||||
|
Loading…
Reference in New Issue
Block a user