Skip to content

Commit 99acc69

Browse files
authored
Merge pull request #7 from feyounger/master
fix: fix missing mongo apt signing_key when install mongodb-mongosh
2 parents b5f07e5 + e669d7e commit 99acc69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/installation/mongo.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ onex::mongo::docker::install()
4444

4545
onex::mongo::pre_install()
4646
{
47+
# 获取 MongoDB 公钥
48+
echo ${LINUX_PASSWORD} | sudo -S wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
49+
4750
# 添加 MongoDB APT 源
4851
echo ${LINUX_PASSWORD} | sudo -S echo "deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
4952

@@ -74,9 +77,6 @@ onex::mongo::sbs::install()
7477

7578
echo ${LINUX_PASSWORD} | sudo -S apt install -y gnupg
7679

77-
# 获取 MongoDB 公钥
78-
echo ${LINUX_PASSWORD} | sudo -S wget -qO - https://www.mongodb.org/static/pgp/server-7.0.asc | sudo apt-key add -
79-
8080
# 安装 MongoDB 服务端
8181
# 以为我们uninstall时会删除配置文件,所以要使用--force-confmiss 重新安装配置文件
8282
onex::util::sudo "apt -y -o Dpkg::Options::="--force-confmiss" --reinstall install mongodb-org mongodb-org-server"

0 commit comments

Comments
 (0)