braid
braid copied to clipboard
"git clone" error message is useless
I am having an issue while adding a mirror by using ssh. I had this error another time and bypassed the error by using https link to the repository. But i only have ssh access this time.
Command line :
braid add --verbose ssh://git@IP/rac/project.git Externe/M2M
Output :
Braid: Executing
git --version` in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git rev-parse --is-inside-work-tree
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git rev-parse --show-prefix
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git status
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git rev-parse HEAD
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git add .braids.json
in D:/Devmeon/AMC/erdf-c1c4
Braid: Adding mirror of 'ssh://git@IP/rac/project.git'.
Braid: Executing git --version
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git rev-parse --is-inside-work-tree
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git rev-parse --show-prefix
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git config remote.master/braid/Externe/M2M.url
in D:/Devmeon/AMC/erdf-c1c4
Braid: Setup: Mirror 'Externe/M2M' already has a remote. Replacing it (force)
Braid: Executing git remote rm master/braid/Externe/M2M
in D:/Devmeon/AMC/erdf-c1c4
Braid: Setup: Creating remote for 'Externe/M2M'.
Braid: Executing git remote add master/braid/Externe/M2M C:/Users/Tristan/.braid/cache/ssh___git_IP_rac_project.git
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git config remote.master/braid/Externe/M2M.url
in D:/Devmeon/AMC/erdf-c1c4
Braid: Executing git clone --mirror ssh://git@IP/rac/project.git C:/Users/Tristan/.braid/cache/ssh___git_IP_rac_project.git
in D:/Devmeon/AMC/erdf-c1c4
Braid: Resetting to 'c4d9820'.
Braid: Executing git reset --hard c4d98205dd713a7de7c1161664a4f69b056d2216
in D:/Devmeon/AMC/erdf-c1c4
Braid: Shell error: Cloning into bare repository 'C:/Users/Tristan/.braid/cache/ssh___git_IP_rac_project.git'...`
braid version : braid 1.1.3 git version : git version 2.27.0.windows.1
It looks like Braid is printing only the first line of the stderr output when git clone
fails. That's unhelpful; we should either print the full output or find some other solution.
In the meantime, if you can run Braid from source, please try replacing @err.to_s.split("\n").first
with @err.to_s
in lib/braid/operations.rb
to get the full output. If that's too hard, you can wait for us to make a Braid release with the better error reporting.
I'm going to use this thread for the bad git clone
error reporting. Devmeon, if you determine that the actual error is caused by another bug in Braid rather than a misconfiguration by you, please file another issue.