func (p *GitHubProvider) CloneRepository(cloner cloner.Cloner,
	repository GitRepository) (string, error) {
	url := repository.GetHTTPUrl()
	// If token doesn't exist, don't try to basic auth
	if p.token != "" {
		url = strings.Replace(url, "https://", fmt.Sprintf("https://x-access-token:%s@", p.token), 1)
	}

	return cloner.CloneRepository(url)
}
// CloneRepository clones a Github repository given the token. The token must have the `read_repository` rights.
CloneRepository clones a Github repository given the token. The token must have the `read_repository` rights.
// CloneRepository clones a Github repository given the token . The token must have the ` read_repository ` rights .
func (p *GitHubProvider) CloneRepository(cloner cloner.Cloner,
	repository GitRepository) (string, error) {
	url := repository.GetHTTPUrl()
	if p.token != "" {
		url = strings.Replace(url, "https://", fmt.Sprintf("https://x-access-token:%s@", p.token), 1)
	}
	return cloner.CloneRepository(url)
}
func ( p * GitHubProvider ) CloneRepository ( cloner cloner . Cloner , repository GitRepository ) ( string , error ) { url := repository . GetHTTPUrl ( ) if p . token != " " { url = strings . Replace ( url , " " , fmt . Sprintf ( " " , p . token ) , 1 ) } return cloner . CloneRepository ( url ) }
CloneRepository clones a Github repository given the token.
CloneRepository clones a Github repository given the token .
// If token doesn't exist, don't try to basic auth