Dagger
Search

private-git

A module to help you easily perform clone, push, and pull operations on your private git.
Example (Push)
no available example in current language
func (e *Examples) PrivateGit_Push(git *dagger.Service, repo *dagger.Directory) *dagger.Container {
	return dag.
		PrivateGit(dagger.PrivateGitOpts{
			BaseCtr: dag.PrivateGit().BaseContainer().WithServiceBinding("gitea", git),
		}).
		WithUserPassword("super", dag.SetSecret("password", "super")).
		Repo(repo).
		Push()
}
no available example in current language
no available example in current language
Example (CloneBySsh)
no available example in current language
func (e *Examples) PrivateGit_CloneBySsh(git *dagger.Service, key *dagger.Secret) *dagger.Directory {
	return dag.
		PrivateGit(dagger.PrivateGitOpts{
			BaseCtr: dag.PrivateGit().BaseContainer().WithServiceBinding("gitea", git),
		}).
		WithSSHKey(key).
		WithRepoURL("git@gitea:super/test.git").
		Clone().
		Directory()
}
no available example in current language
no available example in current language
Example (CloneByHttp)
no available example in current language
func (e *Examples) PrivateGit_CloneByHttp(git *dagger.Service) *dagger.Directory {
	return dag.
		PrivateGit(dagger.PrivateGitOpts{
			BaseCtr: dag.PrivateGit().BaseContainer().WithServiceBinding("gitea", git),
		}).
		WithUserPassword("super", dag.SetSecret("password", "super")).
		WithRepoURL("http://gitea:3000/super/test.git").
		Clone().
		Directory()
}
no available example in current language
no available example in current language

Installation

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

Entrypoint

Return Type
PrivateGit !
Arguments
NameTypeDescription
baseCtrContainer base container
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
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: When a Service is passed directly as a parameter to an external Dagger function, it does not bind to the container created inside the Dagger function. (Confirmed in v0.13.3)

Return Type
Container !
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 base-container
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 repo --dir DIR_PATH
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-ssh-key --ssh-key env:MYSECRET
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH \
 container
func (m *myModule) example(username string, password *Secret, dir *Directory) *Container  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir).
			Container()
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory) -> dagger.Container:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
		.container()
	)
@func()
example(username: string, password: Secret, dir: Directory): Container {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
		.container()
}

directory() 🔗

Returns the repository.

Return Type
Directory !
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH \
 directory
func (m *myModule) example(username string, password *Secret, dir *Directory) *Directory  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir).
			Directory()
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory) -> dagger.Directory:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
		.directory()
	)
@func()
example(username: string, password: Secret, dir: Directory): Directory {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
		.directory()
}

setConfig() 🔗

Set the user’s name and email.

Return Type
PrivateGitRepo !
Arguments
NameTypeDefault ValueDescription
userNameString !-No description provided
userEmailString !-No description provided
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH \
 set-config --user-name string --user-email string
func (m *myModule) example(username string, password *Secret, dir *Directory, userName string, userEmail string) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir).
			SetConfig(userName, userEmail)
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory, user_name: str, user_email: str) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
		.set_config(user_name, user_email)
	)
@func()
example(username: string, password: Secret, dir: Directory, userName: string, userEmail: string): PrivateGitRepo {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
		.setConfig(userName, userEmail)
}

push() 🔗

Push the repository.

Return Type
Container !
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH \
 push
func (m *myModule) example(username string, password *Secret, dir *Directory) *Container  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir).
			Push()
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory) -> dagger.Container:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
		.push()
	)
@func()
example(username: string, password: Secret, dir: Directory): Container {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
		.push()
}

pull() 🔗

Pull the repository.

Return Type
Directory !
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH \
 pull
func (m *myModule) example(username string, password *Secret, dir *Directory) *Directory  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir).
			Pull()
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory) -> dagger.Directory:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
		.pull()
	)
@func()
example(username: string, password: Secret, dir: Directory): Directory {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
		.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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-ssh-key --ssh-key env:MYSECRET \
 with-repo-url --ssh-url string
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-ssh-key --ssh-key env:MYSECRET \
 repo --dir DIR_PATH
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
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 with-repo-url --web-url string
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)
}

repo() 🔗

Set up an existing repository folder.

Return Type
PrivateGitRepo !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 repo --dir DIR_PATH
func (m *myModule) example(username string, password *Secret, dir *Directory) *PrivateGitRepo  {
	return dag.
			PrivateGit().
			WithUserPassword(username, password).
			Repo(dir)
}
@function
def example(username: str, password: dagger.Secret, dir: dagger.Directory) -> dag.PrivateGitRepo:
	return (
		dag.private_git()
		.with_user_password(username, password)
		.repo(dir)
	)
@func()
example(username: string, password: Secret, dir: Directory): PrivateGitRepo {
	return dag
		.privateGit()
		.withUserPassword(username, password)
		.repo(dir)
}

PrivateGitRepoUrl 🔗

PrivateGit with target Repositorydml URL information added

clone() 🔗

Clone the Git repository.

Return Type
PrivateGitRepo !
Example
dagger -m github.com/seungyeop-lee/daggerverse/private-git@d582cc3d753317c638198c0a425b6bfb6d352793 call \
 with-user-password --username string --password env:MYSECRET \
 with-repo-url --web-url string \
 clone
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()
}