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

Template and steps not working as expected [BUG] #10

Open
eo33 opened this issue Dec 9, 2024 · 0 comments
Open

Template and steps not working as expected [BUG] #10

eo33 opened this issue Dec 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eo33
Copy link

eo33 commented Dec 9, 2024

Describe the bug

Hey there 👋 I tried following the steps written in the README but I'm getting this error.

Expected behavior

A working docusaurus project.

Current behavior

This is what I'm getting:

PS D:\API Docs> npx create-docusaurus@3.5.2 my-website --package-manager yarn
√ Select a template below... » Git repository
√ Enter a repository URL from GitHub, Bitbucket, GitLab, or any other public repo.
(e.g: https://github.com/ownerName/repoName.git) ... https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs.git
√ How should we clone this repo? » Copy: do a shallow clone, but do not create a git repo
[INFO] Creating new Docusaurus project...
fatal: Too many arguments.

usage: git clone [<options>] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    --reject-shallow      don't clone shallow repository
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as shared repository
    --recurse-submodules[=<pathspec>]
                          initialize submodules in the clone
    --recursive ...       alias of --recurse-submodules
    -j, --jobs <n>        number of submodules cloned in parallel
    --template <template-directory>
                          directory from which templates will be used
    --reference <repo>    reference repository
    --reference-if-able <repo>
                          reference repository
    --dissociate          use --reference only while cloning
    -o, --origin <name>   use <name> instead of 'origin' to track upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote
    --depth <depth>       create a shallow clone of that depth
    --shallow-since <time>
                          create a shallow clone since a specific time
    --shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    --single-branch       clone only one branch, HEAD or --branch
    --no-tags             don't clone any tags, and make later fetches not to follow them
    --shallow-submodules  any cloned submodules will be shallow
    --separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, --config <key=value>
                          set config inside the new repository
    --server-option <server-specific>
                          option to transmit
    -4, --ipv4            use IPv4 addresses only
    -6, --ipv6            use IPv6 addresses only
    --filter <args>       object filtering
    --also-filter-submodules
                          apply partial clone filters to submodules
    --remote-submodules   any cloned submodules will use their remote-tracking branch
    --sparse              initialize sparse-checkout file to include only files at root

[ERROR] Cloning Git template failed!

Possible solution

I cloned the repo directly using git clone https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs.git. Then I installed all the packages using yarn install and run the docusaurus instance. The site was running smoothly until I click on the Petstore API section. It gives this error:
image

Steps to reproduce

Here are the steps that I followed:

  1. Run npx create-docusaurus@3.5.2 my-website --package-manager yarn
  2. Select Git repository
  3. Enter https://github.com/PaloAltoNetworks/docusaurus-template-openapi-docs.git
  4. Select Copy: do a shallow clone, but do not create a git repo

Context

I'm trying to display my OpenAPI specification in Docusaurus.

@eo33 eo33 added the bug Something isn't working label Dec 9, 2024
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
None yet
Development

No branches or pull requests

1 participant