jj git push fails with error stating "Error: early EOF"
Description
When running jj git push on a new commit in a new branch got an unexpected error that didn't indicate what was actually wrong.
Steps to Reproduce the Problem
I'm not sure how to independently recreate this issue, but this happened on a newly jj cloned repo (via https) and ran gh auth login. I imagine I'm not correctly auth'd or something similar due to the error message.
... created branch
... committed
> jj --debug git push
2024-06-08T21:40:48.777299Z INFO jj_cli::cli_util: debug logging enabled
Branch changes to push to origin:
Add branch martinvonzjj_update_version0.18.0 to bd396a1c9375
2024-06-08T21:40:50.418599Z INFO run_command: jj_lib::git: using credential_helper
Error: early EOF; class=Net (12); code=Eof (-20)
> jj
@ snpwlwmz RoscoP 2024-06-08 14:40:33 177106e3
│ (empty) (no description set)
◉ pmvxvzzk RoscoP 2024-06-08 14:40:33 martinvonzjj_update_version0.18.0 bd396a1c
│ Updating martinvonz.jj to 0.18.0
◉ kssvmxyy 59480337+ilike2burnthing 2024-06-08 03:34:56 master@upstream 4d01ecf2
│ New version: Jackett.Jackett version 0.22.84 (#157124)
◌ (elided revisions)
Expected Behavior
Error message describing the underlying issue and any corrective action to take.
Actual Behavior
Prints out:
Error: early EOF; class=Net (12); code=Eof (-20)
Specifications
- Platform: Windows 10 22h2
- Version: 0.17.1-e1d8705546d3971fef23bc6a4a7589283e5e0717
Does regular git push work? If you're not using a colocated repo, you can use git --git-dir .jj/repo/store/git push.
Got this
> git --git-dir .jj/repo/store/git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
> git --git-dir .jj/repo/store/git push --set-upstream origin master
error: src refspec master does not match any
error: failed to push some refs to 'https://github.com/RoscoP/winget-pkgs'
Try running jj git export before the git push, that should create all the branches in the git repo. Alternatively, you can create the master branch manually.
If you change things in Git, you will also need jj git import to get these changes before another jj git export will work.
In a co-located repo, these are done automatically for you.