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

Console output says 'Invalid template reoository!' when generating template #596

Closed
ghobona opened this issue Oct 27, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@ghobona
Copy link

ghobona commented Oct 27, 2023

When running the following command...

docker run --rm -v "$(pwd)":/metanorma metanorma/metanorma metanorma new -d standard -t ogc -l https://github.com/metanorma/metanorma-templates-ogc folder_for_standard

The template is generated but the top of the console output reads Invalid template reoository!.

See attached.

Screenshot 2023-10-27 at 23 20 38
@opoudjis opoudjis added the bug Something isn't working label Nov 10, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Nov 10, 2023
@opoudjis opoudjis self-assigned this Nov 10, 2023
@opoudjis
Copy link
Contributor

opoudjis commented Nov 10, 2023

The error is being triggered by this check in metanorma-cli:

https://github.com/metanorma/metanorma-cli/blob/c427853eb2f98135ad331cd2442da0dee0a55a33/lib/metanorma/cli/git_template.rb#L16C7-L22C10

def download
        remove!
        clone_git_template(options[:repo])
      rescue Git::GitExecuteError
        UI.say("Invalid template reoository!")
        nil
      end

That code (which I did not write, four years ago) is failing to print what the error actually is, and that is going to change now.

When you do print what the error is, you find that it is:

output: "Cloning into '/Users/nickn/.metanorma/templates/git/ogc'...\nremote: Repository not found.
fatal: repository 'https://github.com/metanorma/metanorma-templates-ogc/' not found"!

And indeed, @ghobona , you got the URL of the repo wrong. It is https://github.com/metanorma/mn-templates-ogc

@opoudjis opoudjis moved this from 🆕 New to 🏗 In progress in Metanorma Nov 10, 2023
opoudjis added a commit to metanorma/metanorma-cli that referenced this issue Nov 10, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Metanorma Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants