Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds 2FA support to git-fork #615

Merged
merged 1 commit into from
Jan 27, 2017
Merged

Adds 2FA support to git-fork #615

merged 1 commit into from
Jan 27, 2017

Conversation

techjacker
Copy link
Contributor

Two factor authentication support + minor linting

@hemanth
Copy link
Collaborator

hemanth commented Jan 24, 2017

LGTM.

Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolaiskogheim @qw3rtman
Any other ideas?

ssh -o BatchMode=yes [email protected] exit >/dev/null 2>&1
ssh_exit_code=$?
if [[ "$ssh_exit_code" = 0 ]] || [[ "$ssh_exit_code" = 1 ]]; then
if ssh -T [email protected] 2>&1 | grep -qi 'success'; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enter host password for user 'spacewander':
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? no

Is there a way to disable the prompt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems possible. However doing so would expose the user to MITM attacks.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could tell users what will happen before ssh?
Just don't let them surprised.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, something like echo 'Add github remote as SSH (you will be prompted to verify the server's credentials)?'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Add GitHub remote branch via SSH (you will be prompted to verify the server's credentials)? could be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added and rebased

@spacewander
Copy link
Collaborator

Merged.
Thanks, @techjacker

@techjacker
Copy link
Contributor Author

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants