-
Notifications
You must be signed in to change notification settings - Fork 312
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
Oktokit zipball download not including .git file in zip #502
Comments
👋🏻 Thanks for reaching out! This API just gives you the repository contents for a particular Out of interest, why do you want the |
@timrogers thanks for reply. We are developing a platform where you can import code from github so we need a copy of the whole repo in user's virtual machine. In that case user need git info to commit and update the repo with github after some modification. Is there any other way to download whole repo other than using |
There isn't, as far as I know, any way to download a repo from the API including all of the history in the You should be able to clone with Git using an API access token, e.g. |
Since this clone command happens within the code in node.js I have to spawn a shell to execute git clone command which we trying to avoid. I know git clone command works but it's slower than downloading whole repo. |
Hey @SohelKabir, You might need to try the artifact endpoint as the download an archive endpoint will only create an archive, much like it does with the release, at a given Though I have not implemented it myself, I have a suggestion that might work. There are a few gymnastics involved with using this ( the idea is based on the result of an A possible workflow for this would be:
Note this requires the actions scope on whatever auth token you have to be able to download the archive. We typically do not have APIs that reproduce the behavior of git. This is because our APIs are trying to extend our platform, not git itself. I hope this helps. |
I tried to download github repository zip file with oktokit/core like this but not getting .git file in folder when extract the files!
Is this expected behavior or bug?
"@octokit/core": "^4.0.4",
The text was updated successfully, but these errors were encountered: