MCPcopy Create free account
hub / github.com/dagger/dagger / git

Method git

sdk/python/src/dagger/client/gen.py:13043–13093  ·  view source on GitHub ↗

Queries a Git repository. Parameters ---------- url: URL of the git repository. Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}`. Suffix ".git" is optional. keep_git_dir: DEPR

(
        self,
        url: str,
        *,
        keep_git_dir: bool | None = True,
        ssh_known_hosts: str | None = "",
        ssh_auth_socket: "Socket | None" = None,
        http_auth_username: str | None = "",
        http_auth_token: "Secret | None" = None,
        http_auth_header: "Secret | None" = None,
        experimental_service_host: "Service | None" = None,
    )

Source from the content-addressed store, hash-verified

13041 return GeneratedCode(_ctx)
13042
13043 def git(
13044 self,
13045 url: str,
13046 *,
13047 keep_git_dir: bool | None = True,
13048 ssh_known_hosts: str | None = "",
13049 ssh_auth_socket: "Socket | None" = None,
13050 http_auth_username: str | None = "",
13051 http_auth_token: "Secret | None" = None,
13052 http_auth_header: "Secret | None" = None,
13053 experimental_service_host: "Service | None" = None,
13054 ) -> GitRepository:
13055 """Queries a Git repository.
13056
13057 Parameters
13058 ----------
13059 url:
13060 URL of the git repository.
13061 Can be formatted as `https://{host}/{owner}/{repo}`,
13062 `git@{host}:{owner}/{repo}`.
13063 Suffix ".git" is optional.
13064 keep_git_dir:
13065 DEPRECATED: Set to true to keep .git directory.
13066 .. deprecated:: Set to true to keep .git directory.
13067 ssh_known_hosts:
13068 Set SSH known hosts
13069 ssh_auth_socket:
13070 Set SSH auth socket
13071 http_auth_username:
13072 Username used to populate the password during basic HTTP
13073 Authorization
13074 http_auth_token:
13075 Secret used to populate the password during basic HTTP
13076 Authorization
13077 http_auth_header:
13078 Secret used to populate the Authorization HTTP header
13079 experimental_service_host:
13080 A service which must be started before the repo is fetched.
13081 """
13082 _args = [
13083 Arg("url", url),
13084 Arg("keepGitDir", keep_git_dir, True),
13085 Arg("sshKnownHosts", ssh_known_hosts, ""),
13086 Arg("sshAuthSocket", ssh_auth_socket, None),
13087 Arg("httpAuthUsername", http_auth_username, ""),
13088 Arg("httpAuthToken", http_auth_token, None),
13089 Arg("httpAuthHeader", http_auth_header, None),
13090 Arg("experimentalServiceHost", experimental_service_host, None),
13091 ]
13092 _ctx = self._select("git", _args)
13093 return GitRepository(_ctx)
13094
13095 def host(self) -> Host:
13096 """Queries the host environment."""

Callers 15

test_git_repositoryFunction · 0.45
test_container_buildFunction · 0.45
api.spec.tsFile · 0.45
testGitMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45
clone_with_sshMethod · 0.45
cloneWithSshMethod · 0.45
fooMethod · 0.45
fooMethod · 0.45
advanced_directoryMethod · 0.45
advancedDirectoryMethod · 0.45

Calls 3

ArgClass · 0.90
_selectMethod · 0.80
GitRepositoryClass · 0.70

Tested by 3

test_git_repositoryFunction · 0.36
test_container_buildFunction · 0.36
testGitMethod · 0.36