Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile文件 gensecret 有问题 #2

Open
zbingwen opened this issue May 20, 2021 · 1 comment
Open

makefile文件 gensecret 有问题 #2

zbingwen opened this issue May 20, 2021 · 1 comment

Comments

@zbingwen
Copy link

gensecret:
	KEY=$$(cat sshkeys/id_rsa.pub |base64) ;\
	sed "s/PUBLIC_KEY/$${KEY}/" secret.yaml.tmpl	> secret.yaml

在centos 7 跑失败

改成

KEY := $(shell cat sshkeys/id_rsa.pub |base64 -w 0 |  tr -d \\n) 
gensecret:
	@echo "${KEY}"
	sed 's/PUBLIC_KEY/"${KEY}"/' secret.yaml.tmpl	> secret.yaml
@CommanderAsdasd
Copy link

make all
rm -f sshkeys/id_rsa*
ssh-keygen -q -f sshkeys/id_rsa -N '' -t rsa
KEY=$(cat sshkeys/id_rsa.pub |base64) ;\
sed "s/PUBLIC_KEY/${KEY}/" secret.yaml.tmpl	> secret.yaml
sed: -e expression #1, char 89: unterminated `s' command
make: *** [Makefile:19: gensecret] Error 1

Same to me, failing on sed command

$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 33 (Thirty Three)
Release:	33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants