问题记录
# 1.报错:error: Entry's not uptodate. Cannot update sparse checkout.
# 问题描述:将 git 上的工程目录重命名后, jenkins 上 Pipeline script 中的 sparseCheckoutPaths 中 dir 文件也对应修改了, jenkins 构建 checkout 报错。
# 解决方案:先不修改 dir 中目录 checkout 一次,再修改 dir 目录后再发布一次即可。
1
2
2
# 2. 项目代码打包发布到 K8s 时报错:error converting YAML to JSON: yaml: line 5: found character that cannot start any token
https://blog.csdn.net/kungfuape/article/details/119569336
在pom.xml文件中添加maven编译时的过滤规则:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# 解决Host key verification failed.
ssh-keygen -R 你要访问的IP地址
https://blog.csdn.net/wd2014610/article/details/85639741
https://m.isolves.com/it/wlyx/fwq/2023-03-13/71534.html
cat ~/.ssh/id_rsa.pub | ssh root@10.23.63.152 "umask 077; mkdir -p .ssh ; cat >> .ssh/authorized_keys"
1
2
3
4
5
6
2
3
4
5
6