Open Krastanov opened 1 year ago
what does it say if you run
RUST_LOG=debug ion summon
also what OS are you on? is this a linux distro?
[2023-04-09T21:42:38Z DEBUG ion::config] config file: /home/stefan/.config/ion/config.toml
[2023-04-09T21:42:38Z DEBUG ion::config] config file: true
[2023-04-09T21:42:38Z DEBUG ion::commands::summon] summoning JuliaRegistrator to register /home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl/Project.toml
[2023-04-09T21:42:38Z DEBUG ion::utils::git] get_toplevel_path("/home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl")
[2023-04-09T21:42:38Z DEBUG ion::utils::read_command] Running command: Command {
program: "git",
args: [
"git",
"rev-parse",
"--show-toplevel",
],
cwd: Some(
"/home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl",
),
create_pidfd: false,
}
[2023-04-09T21:42:39Z DEBUG ion::utils::git] current_branch("/home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl")
[2023-04-09T21:42:39Z DEBUG ion::utils::read_command] Running command: Command {
program: "git",
args: [
"git",
"rev-parse",
"--abbrev-ref",
"HEAD",
],
cwd: Some(
"/home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl",
),
create_pidfd: false,
}
[2023-04-09T21:42:39Z DEBUG ion::utils::read_command] Running command: Command {
program: "git",
args: [
"git",
"symbolic-ref",
"refs/remotes/origin/HEAD",
],
cwd: Some(
"/home/stefan/Documents/ScratchSpace/quantumjulia/QuantumClifford.jl",
),
create_pidfd: false,
}
Failed to read command
It seems the following command doesn't work
git symbolic-ref refs/remotes/origin/HEAD
this command is for getting the current default branch, could you try it locally and see if this fails?
This is on Ubuntu 22.04. It is on git 2.37.2
The command indeed fails:
> git symbolic-ref refs/remotes/origin/HEAD
fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
But this issue seems very similar and seems to suggest a workaround https://github.com/jhauberg/gitdoctor/issues/3
> git remote show origin
Host key fingerprint is ...
...
+----[SHA256]-----+
* remote origin
Fetch URL: git@github.com:Krastanov/QuantumClifford.jl.git
Push URL: git@github.com:Krastanov/QuantumClifford.jl.git
HEAD branch: master
... many more lines of output
Or maybe there is some standard way to create refs/remotes/origin/HEAD
?
Another place where a similar issue has popped up https://github.com/dhimmel/manubot-rootstock/commit/667d170eb2f1898156226456292d25c1c99377c4
So I wrote that because of this StackOverflow post: https://stackoverflow.com/questions/28666357/how-to-get-default-git-branch
Maybe there is a more robust way of detecting the default repo branch in the remote repo, the other way might be using the GitHub API to get the default repo branch, I'm not sure if how it works yet.
If I first run git remote set-head origin --auto
then git symbolic-ref refs/remotes/origin/HEAD
works fine. Could that be enough of a solution?
Hmm, I think I need to understand when refs/remotes/origin/HEAD
will appear first and why it might not be there first. But yeah, please use this as a workaround for now until we figure out something more robust.
I installed
ion
in a local path, successfully authenticated it to github, successfully usedbump
but thensummon
is erroring with error code 101:Not really sure what to do to debug now