Пример #1
0
Файл: Git.cs Проект: loudej/kudu
        private static Executable GetGitExe(string repositoryPath)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            return exe;
        }
Пример #2
0
Файл: Git.cs Проект: 40a/kudu
 public static string CloneToLocal(string cloneUri, string path = null)
 {
     string repositoryPath = path ?? Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
     Directory.CreateDirectory(repositoryPath);
     var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
     exe.SetTraceLevel(2);
     exe.SetHttpVerbose(true);
     exe.SetSSLNoVerify(true);
     GitExecute(exe, "clone \"{0}\" .", cloneUri);
     return repositoryPath;
 }
Пример #3
0
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            // Use a really long idle timeout, since it's mostly meaningful when running on server, not client
            var exe = new GitExecutable(repositoryPath, idleTimeout: TimeSpan.FromSeconds(3600));
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }
Пример #4
0
        private static Executable GetGitExe(string repositoryPath, IDictionary<string, string> environments = null)
        {
            if (!Path.IsPathRooted(repositoryPath))
            {
                repositoryPath = Path.Combine(PathHelper.LocalRepositoriesDir, repositoryPath);
            }

            FileSystemHelpers.EnsureDirectory(repositoryPath);

            var exe = new GitExecutable(repositoryPath);
            exe.SetTraceLevel(2);
            exe.SetHttpVerbose(true);
            exe.SetSSLNoVerify(true);

            if (environments != null)
            {
                foreach (var pair in environments)
                {
                    exe.EnvironmentVariables.Add(pair);
                }
            }

            return exe;
        }