-
Notifications
You must be signed in to change notification settings - Fork 27
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
github mount error 422 not a valid tree #43
Comments
The github REST API I'm using acts really strange when the remote repo is not initialized. If you check the "Initialize this repository with a README" box when creating your repo, it will have an initial commit and tree and play much nicer with tedit. I'm not sure there is much I can do on my end since it's their API that's buggy around this area. Once I implement proper git remotes with clone/pull/push, tedit will have the same capabilities as normal git. |
I did initiate it with a readme. I'll try to do a second commit and try
|
Also, you can always reset tedit to factory settings by using the "Remove All" option. But make sure you've backed up your github token somewhere, because it will forget that too. Eventually I'll integrate a proper oauth flow (if possible) for better UX. If you're still having troubles, I may need more details list the actual XHR request in the network panel of the chrome app to see where the issue it. If you open chrome://extensions while tedit is open, you can get to devtools for the index.html page. Once open to the network tab, reload the app and it will record activity. |
I saved a .har file of the network log. How can I send it to you? I think it has the auth key in plain text. |
It does. You can email it to me at [email protected]. I usually either On Mon, May 5, 2014 at 1:39 PM, Yuval Drori [email protected]:
|
Sent it to your email. |
Ok, I know what's wrong now. I have long known that github doesn't allow creating empty trees. I have several workarounds in js-github to allow tedit to have empty folders locally and that worked for a long time. But recently (10 days ago) they added some validators to their API that rejects any requests containing hashes pointing to invalid objects. Since the API forbids tedit from creating the empty tree on the folder, when you later try to update your root tree to contain the empty "src" folder, it's rejecting that update because it references a tree that doesn't exist in github. As a workaround, don't create empty folders. You can create files in subfolders directly in tedit. Simply go to the root and create a new file like "src/app.js" and it will create the "src" folder if it's not there already. Sorry for the trouble. Like I said, the Github API I'm using here is very buggy and I'm working on moving to a more traditional flow. |
Worked like a charm! Thanks. |
commit last_commit_hash
Error: Invalid HTTP response: 422 tree.sha
some_hash is not a valid tree
The text was updated successfully, but these errors were encountered: