advanced settings option: set use SSH as default remote when checking out PR #190

Closed
opened 2020-09-19 04:03:08 +00:00 by techknowlogick · 4 comments

For example when I attempt to run tea pr checkout 188 in this repo, it uses https://gitea.com/noerw/tea.git:pr-details as my remote, whereas I'd prefer it to use an SSH remote.

For example when I attempt to run `tea pr checkout 188` in this repo, it uses ` https://gitea.com/noerw/tea.git:pr-details` as my remote, whereas I'd prefer it to use an SSH remote.
6543 added the
kind
enhancement
label 2020-09-19 04:43:55 +00:00
noerw added the
status/has-pull
label 2020-10-05 11:19:30 +00:00
6543 closed this issue 2020-11-07 07:00:03 +00:00
Member

@techknowlogick I'm revisiting this issue, as we're considering to change the default back to https again..

What is your rationale for checking out PRs via SSH?

@techknowlogick I'm revisiting this issue, as we're considering to change the default back to https again.. What is your rationale for checking out PRs via SSH?
Author
Owner

I clone via SSH which means that git doesn't have any HTTPS credentials saved for cloning via HTTPS and since I have 2fa I'd need to generate an app token.

Perhaps rather than setting SSH or HTTPS as default, tea could detect which protocol is used and check out that way?

I clone via SSH which means that git doesn't have any HTTPS credentials saved for cloning via HTTPS and since I have 2fa I'd need to generate an app token. Perhaps rather than setting SSH or HTTPS as default, tea could detect which protocol is used and check out that way?
Member

@techknowlogick ok, thanks for the context.

Perhaps rather than setting SSH or HTTPS as default, tea could detect which protocol is used and check out that way?

Yeah, that's what i'm going to implement;

  • for remotes that already exist, we use the protocol that matches the remote url.
  • for remotes that need to be created, we use https by default, unless tea has configured an ssh key (which will be automatically detected, as far as possible)

and since I have 2fa I'd need to generate an app token

When you use tea, you should have an apptoken (stored in tea config file).
So this should not be an issue. Or is there something different with 2FA and app tokens?

@techknowlogick ok, thanks for the context. >Perhaps rather than setting SSH or HTTPS as default, tea could detect which protocol is used and check out that way? Yeah, that's what i'm going to implement; - for remotes that already exist, we use the protocol that matches the remote url. - for remotes that need to be created, we use https by default, unless tea has configured an ssh key (which will be automatically detected, as far as possible) > and since I have 2fa I'd need to generate an app token When you use tea, you should have an apptoken (stored in tea config file). So this should not be an issue. Or is there something different with 2FA and app tokens?
Owner

I personally like to use SSH when invoking git command and use HTTPS because of Gitea API.

I personally like to use SSH when invoking git command and use HTTPS because of Gitea API.
6543 closed this issue 2020-12-11 13:42:42 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#190
No description provided.