Dagger
Search

private-git

A module to help you easily perform clone, push, and pull operations on your private git.

Installation

dagger install github.com/seungyeop-lee/daggerverse/private-git@v0.3.1

Entrypoint

Return Type
PrivateGit !
Arguments
NameTypeDescription
baseCtrContainer base container
Example
func (m *myModule) example() *PrivateGit  {
	return dag.
			PrivateGit()
}
@function
def example() -> dag.PrivateGit:
	return (
		dag.private_git()
	)
@func()
example(): PrivateGit {
	return dag
		.privateGit()
}

Types

PrivateGit 🔗

PrivateGit dagger module

baseContainer() 🔗

Get the base container for the PrivateGit module. Used when you need to inject a Service into a BaseContainer and run it.

Example:

dag.PrivateGit(PrivateGitOpts{
	BaseCtr: dag.PrivateGit().BaseContainer().WithServiceBinding("gitea", git),
})...

Note: As of v0.11.2, passing a Service directly as a parameter to an external dagger function would not bind to the container created inside the dagger function.

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			PrivateGit().
			BaseContainer()
}
@function
def example() -> dagger.Container:
	return (
		dag.private_git()
		.base_container()
	)
@func()
example(): Container {
	return dag
		.privateGit()
		.baseContainer()
}

repo() 🔗

Set up an existing repository folder.

Return Type
PrivateGitRepo !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
Example
func (m *myModule) example(dir *Directory) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			Repo(dir)
}
@function
def example(dir: dagger.Directory) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.repo(dir)
	)
@func()
example(dir: Directory): PrivateGitRepo {
	return dag
		.privateGit()
		.repo(dir)
}

withSshKey() 🔗

Set the ssh key.

Note: Tested against RSA-formatted and OPENSSH-formatted private keys.

Return Type
PrivateGitSsh !
Arguments
NameTypeDefault ValueDescription
sshKeySecret !-ssk key file
Example
func (m *myModule) example(sshKey *Secret) *PrivateGitSsh  {
	return dag.
			PrivateGit().
			WithSshKey(sshKey)
}
@function
def example(ssh_key: dagger.Secret) -> dag.PrivateGitSsh:
	return (
		dag.private_git()
		.with_ssh_key(ssh_key)
	)
@func()
example(sshKey: Secret): PrivateGitSsh {
	return dag
		.privateGit()
		.withSshKey(sshKey)
}

withUserPassword() 🔗

Set up user and password information.

Return Type
PrivateGitHttp !
Arguments
NameTypeDefault ValueDescription
usernameString !-No description provided
passwordSecret !-No description provided
Example
func (m *myModule) example(username string, password *Secret) *PrivateGitHttp  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password)
}
@function
def example(username: str, password: dagger.Secret) -> dag.PrivateGitHttp:
	return (
		dag.private_git()
		.with_user_password(username, password)
	)
@func()
example(username: string, password: Secret): PrivateGitHttp {
	return dag
		.privateGit()
		.withUserPassword(username, password)
}

PrivateGitRepo 🔗

Working with private Git repositories

container() 🔗

Returns the container with RepoDir.

Return Type
Container !
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *Container  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone().
			Container()
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dagger.Container:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
		.container()
	)
@func()
example(username: string, password: Secret, webUrl: string): Container {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
		.container()
}

directory() 🔗

Returns the repository.

Return Type
Directory !
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *Directory  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone().
			Directory()
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dagger.Directory:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
		.directory()
	)
@func()
example(username: string, password: Secret, webUrl: string): Directory {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
		.directory()
}

setConfig() 🔗

Set the user’s name and email.

Return Type
PrivateGitRepo !
Arguments
NameTypeDefault ValueDescription
userNameString !-No description provided
userEmailString !-No description provided
Example
func (m *myModule) example(username string, password *Secret, webUrl string, userName string, userEmail string) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone().
			SetConfig(userName, userEmail)
}
@function
def example(username: str, password: dagger.Secret, web_url: str, user_name: str, user_email: str) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
		.set_config(user_name, user_email)
	)
@func()
example(username: string, password: Secret, webUrl: string, userName: string, userEmail: string): PrivateGitRepo {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
		.setConfig(userName, userEmail)
}

push() 🔗

Push the repository.

Return Type
Container !
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *Container  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone().
			Push()
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dagger.Container:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
		.push()
	)
@func()
example(username: string, password: Secret, webUrl: string): Container {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
		.push()
}

pull() 🔗

Pull the repository.

Return Type
Directory !
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *Directory  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone().
			Pull()
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dagger.Directory:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
		.pull()
	)
@func()
example(username: string, password: Secret, webUrl: string): Directory {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
		.pull()
}

PrivateGitSsh 🔗

PrivateGit with SSH settings

withRepoUrl() 🔗

Set the SSH URL of the target repository.

Return Type
PrivateGitRepoUrl !
Arguments
NameTypeDefault ValueDescription
sshUrlString !-No description provided
Example
func (m *myModule) example(sshKey *Secret, sshUrl string) *PrivateGitRepoUrl  {
	return dag.
			PrivateGit().
			WithSshKey(sshKey).
			WithRepoUrl(sshUrl)
}
@function
def example(ssh_key: dagger.Secret, ssh_url: str) -> dag.PrivateGitRepoUrl:
	return (
		dag.private_git()
		.with_ssh_key(ssh_key)
		.with_repo_url(ssh_url)
	)
@func()
example(sshKey: Secret, sshUrl: string): PrivateGitRepoUrl {
	return dag
		.privateGit()
		.withSshKey(sshKey)
		.withRepoUrl(sshUrl)
}

repo() 🔗

Set up an existing repository folder.

Return Type
PrivateGitRepo !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
Example
func (m *myModule) example(sshKey *Secret, dir *Directory) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			WithSshKey(sshKey).
			Repo(dir)
}
@function
def example(ssh_key: dagger.Secret, dir: dagger.Directory) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.with_ssh_key(ssh_key)
		.repo(dir)
	)
@func()
example(sshKey: Secret, dir: Directory): PrivateGitRepo {
	return dag
		.privateGit()
		.withSshKey(sshKey)
		.repo(dir)
}

PrivateGitHttp 🔗

PrivateGit with user and password information added

withRepoUrl() 🔗

Set the Web URL of the target repository.

Return Type
PrivateGitRepoUrl !
Arguments
NameTypeDefault ValueDescription
webUrlString !-No description provided
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *PrivateGitRepoUrl  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl)
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dag.PrivateGitRepoUrl:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
	)
@func()
example(username: string, password: Secret, webUrl: string): PrivateGitRepoUrl {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
}

PrivateGitRepoUrl 🔗

PrivateGit with target Repositorydml URL information added

clone() 🔗

Clone the Git repository.

Return Type
PrivateGitRepo !
Example
func (m *myModule) example(username string, password *Secret, webUrl string) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			WithRepoUrl(webUrl).
			Clone()
}
@function
def example(username: str, password: dagger.Secret, web_url: str) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.with_repo_url(web_url)
		.clone()
	)
@func()
example(username: string, password: Secret, webUrl: string): PrivateGitRepo {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.withRepoUrl(webUrl)
		.clone()
}