git_protocol: See or set the default Git protocol

Description Usage Arguments Value Examples

View source: R/git.R

Description

Git operations that address a remote use a so-called "transport protocol". usethis supports HTTPS and SSH. The protocol dictates the Git URL format used when usethis needs to configure the first GitHub remote for a repo:

Two helper functions are available:

This protocol only affects the Git URL for newly configured remotes. All existing Git remote URLs are always respected, whether HTTPS or SSH.

Usage

1
2
3

Arguments

protocol

One of "https" or "ssh"

Value

The protocol, either "https" or "ssh"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
git_protocol()

use_git_protocol("ssh")
git_protocol()

use_git_protocol("https")
git_protocol()

## End(Not run)

usethis documentation built on Feb. 10, 2021, 5:08 p.m.