-
Notifications
You must be signed in to change notification settings - Fork 75
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
"Invalid tree info" - Fileless directories #259
Comments
Hi @blast-hardcheese! Is your microsite repo initialized? Also double check that your sbt values |
@bilki I presume so. It would be easier to just link where I am at this point.
I was successfully able to publish to a non-SSO-protected repo with the API token, fwiw. |
Hey, @blast-hardcheese would you mind (if possible) trying to publish the microsite to another clean empty branch, just to be sure it's not the content of |
@bilki OK, so after digging quite a bit, I discovered that the root problem here is I'm getting I've narrowed down what I suspect is the culprit: It seems as though we're doing top-down to create all the directories, but I suspect github really wants us to navigate depth first, creating the trees as the full hierarchy. I'm wrapping up for the night, but this is where I got. If you've got some advice on how to proceed, (is flipping processing from top-down to bottom-up acceptable to you?) I'd appreciate it. Thanks so far. |
Hey @blast-hardcheese, could you check if your site folder contains any empty dir (in the machine from where you are trying to publish)? I get the exact same error |
@bilki I have a directory that is empty, save for other directories, which contain files. The problem, as I've seen it, is that we create trees only containing blobs, then go back and create the next deepest tree with those blobs, with the parent being another tree. My proposal would be to do a depth-first approach, committing the deepest tree, then collecting that tree's hash as another sibling in the next highest up tree to generate. What do you think? |
I am seeing the same error "Invalid tree info" when trying to use the API to add individual files to my repo. I don't have empty folders. |
Sorry about the delay @blast-hardcheese. That sounds like a possible solution, have you already tried it? I honestly don't know in what order github expects dir creations to happen. Anyway, you could open an issue at https://github.com/47deg/sbt-org-policies/issues, which is where the order on how commit dirs are updated is decided, and it's where your suggestion will apply. |
I've been using
Then, processed through
I found that Somehow, a thing that indirectly solve this, is to use But, summarizing, and getting back to the bug, after some other tests, we can conclude that
Being |
I have the same problem.
When I got such a structure that the publication began to fail with an error "Invalid tree info":
I got directory dir3 with no files in it - just another directory (dir4)
|
Following along with sbt-microsite: Publish using GitHub4s, I've created a token with the
repo
scope, and haveEnable SSO
'd (which is required by my environment).I was then able to use the Github API to perform some simple tests:
Despite this, when attempting to use
publishMicrosite
, I get:I found 47degrees/sbt-org-policies#388 (comment), which was largely unhelpful other than to suggest that perhaps despite supplying the token, it doesn't work as advertised (possibly in my SSO environment).
Any assistance would be appreciated!
The text was updated successfully, but these errors were encountered: