dune-release icon indicating copy to clipboard operation
dune-release copied to clipboard

rewrite git:// to ssh when pushing tag

Open ygrek opened this issue 6 years ago • 8 comments

I learned that dune-release publish will automatically use git+ssh protocol when presented with https://github.com url in dev-repo. Can it do the same for git:// urls please?

ygrek avatar Oct 09 '19 18:10 ygrek

ref #50

ygrek avatar Oct 09 '19 18:10 ygrek

We plan to switch to git+https instead (see #215), would that work for you?

gpetiot avatar Jun 24 '20 15:06 gpetiot

I see in the linked issue that macos users somehow by default use https and that is the reason for the change? I do not want to use https auth instead of ssh (public key vs password, push access vs full access, typing in password vs automatic). Maybe there should be different defaults for different platforms %)

ygrek avatar Jun 24 '20 16:06 ygrek

I think this is probably worth a field in dune-release global config. Even on macos some users might prefer to use ssh for the reasons mentioned above.

I agree we shouldn't switch from SSH to HTTPS by default, that would break most of our users workflow, I personally use SSH and want to keep it that way.

NathanReb avatar Jun 24 '20 16:06 NathanReb

I'm seeing a connect timeout when trying to use dune-release:

[-] Publishing to github
dune-release: [INFO] Parsing opam file reason.opam
dune-release: [ERROR] Exit code 128 from command
    `git --git-dir .git ls-remote --quiet --tags
       git://github.com/reasonml/reason.git 3.8.1`:
  fatal: unable to connect to github.com:
  github.com[0: 192.30.255.112]: errno=Operation timed out

It looks like GitHub has disabled git:// and something is constructing a URL with that protocol, as per the error message above.

anmonteiro avatar Jun 28 '22 07:06 anmonteiro

I don't think it's constructing it, it's probably just using the dev-repo field: https://github.com/reasonml/reason/blob/master/reason.opam#L8.

Have you tried changing it to git+https?

NathanReb avatar Jun 28 '22 08:06 NathanReb

Nice spotting. My bad!

anmonteiro avatar Jun 28 '22 16:06 anmonteiro

No worries, we could have special rewriting of those URLs for github, knowing they dropped support for this protocol but I think it's best not to to make sure users upgrade their opam files accordingly!

NathanReb avatar Jun 29 '22 07:06 NathanReb