Southclaws / sampctl

The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
GNU General Public License v3.0
241 stars 33 forks source link

Failed to create new commit for release #422

Closed blefony closed 3 years ago

blefony commented 3 years ago

When I use sampctl package release, I get ERROR: failed to release: failed to create new commit for release: rename ~\project\.git\objects\pack\tmp_obj_107906954 ~\project\.git\objects\11\042fb1a5eab1df8683352a0ded6e3e312b86eb: Access is denied.

I tried to rename, but the problem continues with other files. And when I try to delete the objects folder, I get ERROR: failed to release: failed to add versionfile to worktree: object not found. I think this is due to the fact that git commit intercepts the release command and blocks access to the objects folder. Rebooting the PC and trying to quickly make a release also fail. Is there a solution for my problem? Thank you.

ADRFranklin commented 3 years ago

This looks like it's more of a Git issue then a sampctl issue, though sampctl does use a package called go-git which is a git library for go, it doesn't seem like this would be something we can fix. Though I could be wrong.

Please could you post your pawn.json so we can try to reproduce this issue.

blefony commented 3 years ago

pawn.json.zip

Thanks for your reply! Perhaps the problem is not with my pawn.json, since on a clean server from scratch sampctl + a new repository, the errors also occurs. By the way, if you do not use commits (after creating new repo), but immediately run sampctl package release, then the release will be created, but it will only have files that are already in the repo, for example, only README.md

ADRFranklin commented 3 years ago

The issue is happening because the domain for sampctl, is no longer owned by us, since it was left to expire as we are expecting to do a re-branding of this project and move under the openmultiplayer organisation.

Because of the domain no longer being owned and pointing to one of our servers, sampctl is unable to contact the api and create a release for you. This is something that might be fixed in the future, but for now it's a non-working feature.

ADRFranklin commented 3 years ago

Then again, I think I might be mistaken, it's been a while since I looked at the code for releases, and I vaguely remember a step where it adds the package to api.sampctl.com, but I may be wrong.

ADRFranklin commented 3 years ago

Okay, so just ran this myself to test, and it does in fact work fine for me.

Can I ask what your folder structure is like? and when you made a release did you have any commits that needed to be merged or anything?

blefony commented 3 years ago

No, before the release there were only direct commits, no merging, etc. I just made you the admin of my blefonix/brpa repository so you can get familiar with everything in detail.

blefony commented 3 years ago

If it doesn't take you a lot of time, please try to commit to my repo, and then make release. Will it work for you?

ADRFranklin commented 3 years ago

@blefony Hi, you need to create a github personal token that has the repo access, I think you are trying to use a token that doesn't have private repo access

blefony commented 3 years ago

Hi, @ADRFranklin! Thank you for your help. As it turned out, the problem was with my Windows. I installed Linux on VirtualBox, the releases work with it. So the problem is solved :)