GitAliases.

GitClone(ICakeContext, string, DirectoryPath, string, string, GitCloneSettings) Method

Summary

Clone authenticated using specific settings.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static DirectoryPath GitClone(this ICakeContext context, string sourceUrl, DirectoryPath workDirectoryPath, string username, string password, GitCloneSettings cloneSettings)

Examples

GitClone("https://github.com/cake-build/cake.git", 
    "c:/temp/cake", 
    "username", 
    "password",
    new GitCloneSettings{ BranchName = "main" });

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
sourceUrl string URI for the remote repository.
workDirectoryPath DirectoryPath Local path to clone into.
username string Username used for authentication.
password string Password used for authentication.
cloneSettings GitCloneSettings The clone settings.

Return Value

Type Description
DirectoryPath The path to the created repository.