GitHub authentication is live on trac.sagemath.org

130 views
Skip to first unread message

Erik Bray

unread,
Feb 27, 2018, 10:03:08 AM2/27/18
to sage-devel, sagemath-admins


If you have a GitHub account it's now possible to use it to authenticate (via OAuth) with trac.sagemath.org.

This will make giving new users access much less hassle, since if they have an existing GitHub account they can login with it in order to create and comment on tickets.  Manually registering users will no longer be necessary except in some cases (e.g. they don't have and don't want a GitHub account, or we want to give them elevated permissions).

Your old logins will still work, and in fact if you have an existing account on Trac you should continue to use it, as your GitHub login (even if your username is the same on both sites) is treated as a distinct user.

Also of note, this does not extend yet to wiki.sagemath.org--users who wish to edit it should still be manually registered (IMO this reopens the discussion of whether we should just migrate wiki.sagemath.org into the Trac site...)

Please try it out if you're curious and let me know of any issues that arise.

Best,
E

kcrisman

unread,
Feb 27, 2018, 10:57:12 PM2/27/18
to sage-devel

This will make giving new users access much less hassle, since if they have an existing GitHub account they can login with it in order to create and comment on tickets.  Manually registering users will no longer be necessary except in some cases (e.g. they don't have and don't want a GitHub account, or we want to give them elevated permissions).

Nice; is this "only a test" or should we expect it to be something fairly robust for the long term?  Also, do we need to update the documentation, then?  There are several places where it refers to obtaining a Trac account via the "usual method".

Sorry for the questions, hope they help everything go smoothly.

- kcrisman

Erik Bray

unread,
Feb 28, 2018, 3:50:09 AM2/28/18
to sage-devel
No problem. This is intended to be a long-term solution. Obviously,
if there are issues we can tweak things as they arise, and if it's
really a disaster somehow I can remove it and take full
responsibility, though it seems unlikely. I'll add that I was
inspired here by the Twisted project's Trac which also supports (in
fact, *only* supports) login via GitHub.

I already updated the documentation on the front wiki page:
https://trac.sagemath.org/#WelcometotheSageMathDevelopmentOrganizationPage
But as you noted there are other references in the Sage docs that
should be updated. I only know about this page:
http://doc.sagemath.org/html/en/developer/trac.html Maybe you could
point out some others?

I don't want to rush to change too many docs though; let's give it a
trial period of a couple weeks before really firming it up.

Meghana.M Reddy

unread,
Mar 1, 2018, 3:35:53 AM3/1/18
to sage-devel
Hi,

I have been trying to set up git trac so that I can try to fix some bugs.
I used my github login to be able to use the trac server.
I have created an ssh key pair and uploaded the public ssh key in preferences in the trac account.
However, when I use this command with my github username and password -
git trac config --user USERNAME --pass 'PASSWORD'
I get this error -
git_trac.trac_error.
TracAuthenticationError: Authentication with trac server failed.

I am unable to fix the error. Maybe because I'm using a github login? Please help me out.
Apologies if I have been doing some silly mistake.

Thank you,
Meghana

Dima Pasechnik

unread,
Mar 1, 2018, 4:21:17 AM3/1/18
to sage-devel
AFAIK, github login only allows you to comment on tickets. Commit access to trac git repo needs to be obtained in the old way.

Erik Bray

unread,
Mar 1, 2018, 7:00:47 PM3/1/18
to sage-devel
I'm not sure what "git trac config" does. If you've configured your SSH key then there's nothing else to do but push branches. There's nothing to use a username or password for. 

On Mar 1, 2018 10:21, "Dima Pasechnik" <dim...@gmail.com> wrote:
AFAIK, github login only allows you to comment on tickets. Commit access to trac git repo needs to be obtained in the old way.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Erik Bray

unread,
Mar 1, 2018, 7:14:08 PM3/1/18
to sage-devel
On Mar 2, 2018 01:00, "Erik Bray" <erik....@gmail.com> wrote:
I'm not sure what "git trac config" does. If you've configured your SSH key then there's nothing else to do but push branches. There's nothing to use a username or password for. 

Oh I see now. This is Sage's git extensions for creating tickets on Sage's Trac server. I forgot about this since I haven't used it, but I can see how it's convenient. 

The GitHub authentication doesn't know anything about your GitHub password. You'll notice that you (probably, unless you needed to log into GitHub) never provided your GitHub password. Instead you just authorize Sage's Trac site to use your existing GitHub credentials to authorize you. 

So the "git trac" commands won't currently work with this I guess, though I could make that work. In the meantime you can always create tickets through the web interface and use the normal "git push" command to push branches. The only thing "git trac" needs any additional credentials for is creating and updating Trac tickets from the command line. 

Dima Pasechnik

unread,
Mar 13, 2018, 7:33:10 PM3/13/18
to sage-devel
Perhaps it's a silly suggestion, but what does prevent trac from using an external git server, as opposed
to the internal one? Does it need to do git calls which are not possible to do remotely?
If this is possible (perhaps there is even a trac plugin for this?) then it would be possible to use, say, github to 
hold branches, and not git.sagemath.org...)


On Friday, March 2, 2018 at 12:14:08 AM UTC, Erik Bray wrote:
On Mar 2, 2018 01:00, "Erik Bray" <erik....@gmail.com> wrote:
I'm not sure what "git trac config" does. If you've configured your SSH key then there's nothing else to do but push branches. There's nothing to use a username or password for. 

Oh I see now. This is Sage's git extensions for creating tickets on Sage's Trac server. I forgot about this since I haven't used it, but I can see how it's convenient. 

The GitHub authentication doesn't know anything about your GitHub password. You'll notice that you (probably, unless you needed to log into GitHub) never provided your GitHub password. Instead you just authorize Sage's Trac site to use your existing GitHub credentials to authorize you. 

So the "git trac" commands won't currently work with this I guess, though I could make that work. In the meantime you can always create tickets through the web interface and use the normal "git push" command to push branches. The only thing "git trac" needs any additional credentials for is creating and updating Trac tickets from the command line. 


On Mar 1, 2018 10:21, "Dima Pasechnik" <dim...@gmail.com> wrote:
AFAIK, github login only allows you to comment on tickets. Commit access to trac git repo needs to be obtained in the old way.

--
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.

Erik Bray

unread,
Mar 14, 2018, 11:36:25 AM3/14/18
to sage-devel
On Wed, Mar 14, 2018 at 12:33 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> Perhaps it's a silly suggestion, but what does prevent trac from using an
> external git server, as opposed
> to the internal one? Does it need to do git calls which are not possible to
> do remotely?
> If this is possible (perhaps there is even a trac plugin for this?) then it
> would be possible to use, say, github to
> hold branches, and not git.sagemath.org...)

This is something I am working on *in addition to* the existing
git.sagemath.org. I am also investigating using GitLab for this
purpose. The use of GitLab has a couple motivations:
1) Julian Rüth's work on a new continuous integration system for Sage,
particularly using GitLab in nice ways:
https://trac.sagemath.org/ticket/24655
2) Being possibly more politically acceptable to some, at least as
middle-ground (it's all open-source; can move to self-hosted if need
be).

This would not be as a *replacement* to Trac mind you--just a
companion. We might pursue more GitHub integration in addition to
GitLab; I haven't ruled it out (e.g. opening Trac tickets for pull
requests from GH).

More on this as more of the details come into focus.

William Stein

unread,
Mar 14, 2018, 11:38:59 AM3/14/18
to sage-...@googlegroups.com
On Wed, Mar 14, 2018 at 8:36 AM Erik Bray <erik....@gmail.com> wrote:
On Wed, Mar 14, 2018 at 12:33 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> Perhaps it's a silly suggestion, but what does prevent trac from using an
> external git server, as opposed
> to the internal one? Does it need to do git calls which are not possible to
> do remotely?
> If this is possible (perhaps there is even a trac plugin for this?) then it
> would be possible to use, say, github to
> hold branches, and not git.sagemath.org...)

This is something I am working on *in addition to* the existing
git.sagemath.org.  I am also investigating using GitLab for this
purpose.  The use of GitLab has a couple motivations:
1) Julian Rüth's work on a new continuous integration system for Sage,
particularly using GitLab in nice ways:
    https://trac.sagemath.org/ticket/24655
2) Being possibly more politically acceptable to some, at least as
middle-ground (it's all open-source; can move to self-hosted if need
be).

Minor nitpick -- Gitlab is "open core", not open source:  https://about.gitlab.com/2016/07/20/gitlab-is-open-core-github-is-closed-source/
--
-- William Stein
Reply all
Reply to author
Forward
0 new messages