Git accounts

<% if (msg) { %>
<%= msg %>
<% } %> <% if (err) { %>
<%= err %>
<% } %>

Connect with one click

<% if (oauthGithub) { %> πŸ™ Connect GitHub <% } else { %> GitHub: OAuth app not configured<%= user.role === 'admin' ? ' β€” add the Client ID below' : ' β€” ask an admin' %> <% } %> <% if (oauthGitlab) { %> 🦊 Connect GitLab <% } else { %> GitLab: OAuth app not configured<%= user.role === 'admin' ? ' β€” add the Application ID below' : ' β€” ask an admin' %> <% } %>
Opens the provider, you authorize, and the access token is written back automatically. Manual token entry below still works.
<% if (!accounts.length) { %>
No git accounts connected yet β€” add one below to browse repositories when creating projects.
<% } else { %> <% accounts.forEach(function (a) { %> <% }) %>
ProviderLabelAPIAdded
<%= a.provider %> <%= a.label %> <%= a.auth_type === 'oauth' ? 'oauth' : 'token' %> <%= a.api_base || 'default' %> <%= h.fmtTime(a.created_at) %> <% if (a.provider === 'github' && a.auth_type === 'oauth' && oauthGithub) { %> Reconnect <% } %>
<% } %>

Add account

GitHub: classic PAT with repo + admin:repo_hook scopes. GitLab: PAT with api scope. The token is verified before saving and stored on this server only.
<% if (user.role === 'admin') { %>

OAuth provider apps (admin β€” enables the Connect buttons for all users)

<% if (oauthGithub) { %><% } %>
<% if (oauthGitlab) { %><% } %>
<% } %>