Skip to content

SSH or HTTPS #5532

Answered by mislav
kabouzeid asked this question in Q&A
Apr 27, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The default on both github.com (the website) and in GitHub CLI is using the HTTPS protocol for git operations. This default was chosen for interoperability and ease of use:

  • Git users who are behind firewalls find that traffic to port 443 (HTTPS) is more often allowed than traffic to port 22 (SSH).
  • Git authentication for HTTPS is arguably easier to set up than SSH keys, especially with gh auth login. Upon completion of the login flow, GitHub CLI will configure itself as a git credential manager and ensure that all git operations for https://github.com are authenticated with gh's own token.

Some users prefer SSH for git operations, arguing that SSH key authentication is more secure than s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kabouzeid
Comment options

Answer selected by kabouzeid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants