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

对于auth中有特殊符号$的用户名被错误替换 #151

Open
yeluolei opened this issue Jul 18, 2024 · 1 comment · May be fixed by #158
Open

对于auth中有特殊符号$的用户名被错误替换 #151

yeluolei opened this issue Jul 18, 2024 · 1 comment · May be fixed by #158

Comments

@yeluolei
Copy link

Bug Report

Type: bug report

What happened

有的用户名是个placehold,如

xxx repositiory:
username: $oauthtoken
passworld: xxxx

What you expected to happen

这里的 $oauthtoken 因为找不到环境变量,在auth的时候替换成了空用户名

How to reproduce it (as minimally and precisely as possible)

设置任何带有$ 符号的用户名密码都会出错

Anything else we need to know?

Environment

  • image-syncer version: 1.5.4
  • OS (e.g. cat /etc/os-release):
  • Registry version (e.g. habor):
  • Others:
@harrywu0913 harrywu0913 linked a pull request Aug 10, 2024 that will close this issue
@veraicon
Copy link

veraicon commented Aug 15, 2024

可以试试使用\来escape掉$,在os.ExpandEnv中他是起作用的。
xxx repositiory:
username: \$oauthtoken
passworld: xxxx

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

Successfully merging a pull request may close this issue.

2 participants