如何在 SourceTree 中连接到我自己的 Git 服务器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28194161/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 02:52:03  来源:igfitidea点击:

How can I connect to my own Git server in SourceTree?

gitgithubbitbucketatlassian-sourcetreebitbucket-server

提问by BuGiZ400

I have a Git server. However, when I try to add a user to SourceTree, I see that I can add only GitHub, Bitbucket and Stash accounts. How I can run it with my own server?

我有一个 Git 服务器。但是,当我尝试将用户添加到 SourceTree 时,我发现我只能添加 GitHub、Bitbucket 和 Stash 帐户。我如何在我自己的服务器上运行它?

回答by Rog

You can add a repository by URL by going to File -> New/Clone and choosing "+ New Repository", then "Clone from URL".

您可以通过转到 File -> New/Clone 并选择“+ New Repository”,然后选择“Clone from URL”来通过 URL 添加存储库。

This is on Mac SourceTree 2.0+

这是在 Mac SourceTree 2.0+ 上

example

例子

回答by gerryamurphy

Maybe this is a little different on the Windows version of Sourcetree. As mentioned in the previous answer, start with File > Clone/New.

也许这在 Sourcetree 的 Windows 版本上有点不同。如上一个答案所述,从文件 > 克隆/新建开始。

Add your repo details in "Source Path / URL:"

在“源路径/URL:”中添加您的存储库详细信息

enter image description here

在此处输入图片说明

and then "Clone". Once the connection is established, you will be prompted for the credentials.

然后“克隆”。建立连接后,系统将提示您输入凭据。

回答by Jesse Fender

I know this is older, but this is what I had to do to connect to my companies git server and have access to the Sourcetree/GUI features. We use SSH to connect but should work with HTTP:// and HTTPS:// connections.

我知道这是旧的,但这是我必须做的才能连接到我公司的 git 服务器并访问 Sourcetree/GUI 功能。我们使用 SSH 进行连接,但应该使用 HTTP:// 和 HTTPS:// 连接。

when cloning the repository put the correctly formatted following into the clone url input: {protocol}://{username}:{password}@{url to get server}/{path to repository}

克隆存储库时,将正确格式的以下内容放入克隆 url 输入中: {protocol}://{username}:{password}@{url to get server}/{path to repository}

Sourcetree will prompt for password, enter it, and you may choose to save the password. or not, i think its checked by default... and then make sure the rest of the set up is correct and what you need and and it should be good :)

Sourcetree 会提示输入密码,输入密码,你可以选择保存密码。与否,我认为它默认检查......然后确保设置的其余部分是正确的,你需要什么,它应该是好的:)