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

Secrets pulled from text file may include leading/trailing whitespace, including newlines #2338

Closed
morp86 opened this issue Aug 30, 2022 · 1 comment · Fixed by #2390
Closed
Assignees
Labels
type: bug Something isn't working as expected

Comments

@morp86
Copy link

morp86 commented Aug 30, 2022

Environment

  • Nautobot version (Docker tag too if applicable): 1.4.1
  • Python version: 3.2.0
  • Database platform, version: Postgress 14.5
  • Middleware(s):

Expected Behavior

Authentication to GIT repo working as expected. Cloning repo.

Observed Behavior

Authentication failure.
Cmd('git') failed due to: exit code(128) cmdline: git fetch -v origin stderr: 'fatal: credential url cannot be parsed:

Update:
This issue was caused by creating the txt files using VI. As recommended by Glenn M, create the files using echo -n "My Secret String" > my_text_file.txt.

@glennmatthews glennmatthews changed the title Adding GIT repo using Secret-groups results in exit code(128) Secrets pulled from text file may include leading/trailing whitespace, including newlines Aug 30, 2022
@glennmatthews
Copy link
Contributor

Thanks for the report. We've talked about modifying/enhancing this feature to automatically strip leading/trailing whitespace from the raw string read from the text file, so as to avoid exactly this sort of issue. I think the number of cases where a valid Secret does want to retain such whitespace will be vanishingly small.

@lampwins lampwins added the type: bug Something isn't working as expected label Aug 30, 2022
@jathanism jathanism self-assigned this Sep 8, 2022
jathanism added a commit that referenced this issue Sep 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants