Why does sage use different URLs for push and fetch?

46 views
Skip to first unread message

Siddharth Bhat

unread,
Jan 15, 2021, 5:33:31 PM1/15/21
to sage-devel
In "git the hard way", it asks us to setup:

[user@localhost sage]$ git remote add trac git://trac.sagemath.org/sage.git -t master
[user@localhost sage]$ git remote set-url --push trac g...@trac.sagemath.org:sage.git
[user@localhost sage]$ git remote -v
origin      git://github.com/sagemath/sage.git (fetch)
origin      git://github.com/sagemath/sage.git (push)
trac        git://trac.sagemath.org/sage.git (fetch)
trac        g...@trac.sagemath.org:sage.git (push)

Is there some explanation for why SAGEmath uses different URLs to fetch and push from the remote? How does this work, and why is this done? I'd love to know, and perhaps add a blurb to the documentation for folks like me who are puzzled.

Best,
~Siddharth

--

Dima Pasechnik

unread,
Jan 16, 2021, 7:09:16 AM1/16/21
to sage-devel
no particular reason for this, if you do both push (via ssh) and
fetch, you can just use
g...@trac.sagemath.org:sage.git for fetch, as well.

On the other hand, this needs ssh access, so if you don't have or
don't need it, you can use
git://github.com/sagemath/sage.git (which does not do any authentication)


>
> Best,
> ~Siddharth
>
> --
> https://bollu.github.io/
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAPipc%3D2bU61aoiOPzsqvaL0EUMWc_ymN-gtLbkmrvgyu7zm2cA%40mail.gmail.com.

David Roe

unread,
Jan 19, 2021, 3:40:45 PM1/19/21
to sage-devel
On Sat, Jan 16, 2021 at 7:09 AM Dima Pasechnik <dim...@gmail.com> wrote:
On Fri, Jan 15, 2021 at 10:33 PM Siddharth Bhat <siddu...@gmail.com> wrote:
>
> In "git the hard way", it asks us to setup:
>
> [user@localhost sage]$ git remote add trac git://trac.sagemath.org/sage.git -t master
> [user@localhost sage]$ git remote set-url --push trac g...@trac.sagemath.org:sage.git
> [user@localhost sage]$ git remote -v
> origin      git://github.com/sagemath/sage.git (fetch)
> origin      git://github.com/sagemath/sage.git (push)
> trac        git://trac.sagemath.org/sage.git (fetch)
> trac        g...@trac.sagemath.org:sage.git (push)
>
>
> Is there some explanation for why SAGEmath uses different URLs to fetch and push from the remote? How does this work, and why is this done? I'd love to know, and perhaps add a blurb to the documentation for folks like me who are puzzled.

no particular reason for this, if you do both push (via ssh) and
fetch, you can just use
g...@trac.sagemath.org:sage.git for fetch, as well.

On the other hand, this needs ssh access, so if you don't have or
don't need it, you can use
git://github.com/sagemath/sage.git (which does not do any authentication)

I guess I would elaborate on Dima's remarks and say that the reason the two URLs is suggested is that it allows you to fetch from the remote without having to set up ssh keys, whereas just using g...@trac.sagemath.org:sage.git would require ssh keys to fetch any data.
David



>
> Best,
> ~Siddharth
>
> --
> https://bollu.github.io/
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAPipc%3D2bU61aoiOPzsqvaL0EUMWc_ymN-gtLbkmrvgyu7zm2cA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages