I am following this guide:
https://github.com/swagger-api/swagger-ui/blob/master/docs/development/setting-up.md
I have this error:
C:\Users\aoviedoalvarez\Downloads>git clone [email protected]:swagger-api/swagger-ui.git
Cloning into 'swagger-ui'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
However, I cloned the repository but now I have an npm install error:
C:\Users\aoviedoalvarez\Downloads\swagger-ui>npm install
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/ev1stensberg/generator.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=No such file or directory
npm ERR! github.com[1: 192.30.253.112]: errno=No such file or directory
npm ERR!
npm ERR!
npm ERR! exited with error code: 128
I am surely missing something. Please help me.
Example Swagger/OpenAPI definition:
# your YAML here
Swagger-UI configuration options:
SwaggerUI({
// your config options here
})
?yourQueryStringConfig
Follow this guide: https://github.com/swagger-api/swagger-ui/blob/master/docs/development/setting-up.md
Error on npm install
Steps to reproduce the behavior:
@andresoviedo, it looks like your computer can't connect to GitHub properly - do you have any proxies or network monitors running that could cause this?
@shockey: Don't think it's related to that.
The issue here seems to be that the ev1stensberg user has changed their GitHub username to evenstensberg, but _package-lock.json_ from the repo still refers to the old user. And that git command is not working with GitHub's 301 redirects it seems like.
If you open https://github.com/ev1stensberg/generator in the browser, it will redirect just fine to https://github.com/evenstensberg/generator.
Solution: remove your _package-lock.json_ file and run npm install again
Most helpful comment
@shockey: Don't think it's related to that.
The issue here seems to be that the ev1stensberg user has changed their GitHub username to evenstensberg, but _package-lock.json_ from the repo still refers to the old user. And that git command is not working with GitHub's 301 redirects it seems like.
If you open https://github.com/ev1stensberg/generator in the browser, it will redirect just fine to https://github.com/evenstensberg/generator.
Solution: remove your _package-lock.json_ file and run
npm installagain