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

Credentials template for better reuse #9

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Credentials template for better reuse #9

merged 1 commit into from
Sep 24, 2024

Conversation

vaclavdobsicek
Copy link
Contributor

This way of initialize the credentials file covers also the scenario, when the already initialized repo is pulled to the new location.

In this case the credentials.json file is not pulled (because it does not exists on the remote) and it is needed to look into documentation, how this file should looks like and what structure it have.

This problem is solved using template version credentials.template.json which is not ignored and is present also in remote.

@rehoumir
Copy link
Member

rehoumir commented Sep 5, 2024

@vaclavdobsicek , I likely don't understand the issue this is solving - the usual workflow is:

  1. Run prd initialize <project-name>
  2. Fill in the credentials in credentials.json (this file is created by initialize already, no?)
  3. Run prd pull

When you say "already initialized repo", how did you initialize it if not via prd initialize?

@vaclavdobsicek
Copy link
Contributor Author

vaclavdobsicek commented Sep 5, 2024

By calling git clone of already initialized project stored in some git repo.

@rehoumir
Copy link
Member

rehoumir commented Sep 5, 2024

I see, thanks. And what would happen if you ran git clone followed by prd initialize? Won't that create the credentials.json file already now?

@vaclavdobsicek
Copy link
Contributor Author

@rehoumir Honestly, IDK :-) Will it create the credentials.json file?

Btw. to run "initialize" command inside an already-created environment is unusual, IMO.

@rehoumir
Copy link
Member

@vaclavdobsicek , it does. I will close this PR therefore.

@rehoumir rehoumir closed this Sep 17, 2024
@rehoumir rehoumir reopened this Sep 24, 2024
@rehoumir
Copy link
Member

@vaclavdobsicek , "Odvolávám, co jsem odvolal". :D I tried to do it the "current way" and there are at least 3 extra commands. Your solution is better. :)

@rehoumir rehoumir merged commit cce1744 into main Sep 24, 2024
1 check passed
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 this pull request may close these issues.

2 participants