使用 Debian、Docker 和 Nginx 部署 Web 应用

前言

本文将介绍基于 Debian 的系统上使用 Docker 和 Nginx 进行 Web 应用部署的过程。着重介绍了 Debian、Docker 和 Nginx 的安装和配置。

第 1 步:更新和升级 Debian 系统

  1. 通过 SSH 连接到服务器。
  2. 更新软件包列表:sudo apt update
  3. 升级已安装的软件包:sudo apt upgrade

"使用 Debian、Docker 和 Nginx 部署 Web 应用"继续阅读

解决 `Warning: the RSA host key for 'github.com' differs from the key for the IP address 'x.x.x.x'`

Warning: the RSA host key for 'github.com' differs from the key for the IP address 'x.x.x.x'
Offending key for IP in /root/.ssh/known_hosts:5
Matching host key in /root/.ssh/known_hosts:9
Are you sure you want to continue connecting (yes/no)?

You can add the RSA host key for github.com to your server's known_hosts file to avoid seeing this warning every time you run git pull. Here's how to do it:

"解决 `Warning: the RSA host key for 'github.com' differs from the key for the IP address 'x.x.x.x'`"继续阅读

GitHub/GitLab 为不同的项目修改提交名字 user.name 和邮箱 user.email(附:批量处理脚本)

背景

大疫情的背景下,家里的电脑需要同时支撑自己和公司的项目,根据 GitHub/GitLab 网站的提交记录上看,其是根据邮箱来辨识用户的,所以有必要分别针对不同的项目设置不同的 Git 名字 user.name 和邮箱 user.email

"GitHub/GitLab 为不同的项目修改提交名字 user.name 和邮箱 user.email(附:批量处理脚本)"继续阅读