[英]Can TortoiseGit use a repository of Google Cloud Source repositories?
[英]How use Google Cloud on Source Tree?
我刚刚在 Google Cloud 中创建了一个新的 Repo,并想使用 Source Tree 应用程序作为我的 git 交互的控制器。
没有我的谷歌帐户密码 我已经设置了二次验证密码,但仍然无法创建此密码。
编辑:如果我尝试按照本指南设置 Google Cloud Git Repo In SourceTree
它说:
推荐方式(使用gcloud凭证)
我找到了一个解决方法来实现它(macOS):
cd myproject git config credential.helper gcloud.sh
您必须在本地 gcloud
CLI中进行身份验证,并将其保存在$PATH
。然后通过终端启动SourceTree:
open /Applications/SourceTree.app/Contents/MacOS/SourceTree
这会将 $PATH
传播到SourceTree,以使脚本git-credentials-gcloud.sh
可用。
我设法找到了一个不涉及终端的解决方案。 您应该在主<dict>
项的末尾的SourceTree.app包的Info.plist中添加以下内容( /Applications/SourceTree.app/Contents/Info.plist
):
<?xml version="1.0" encoding="UTF-8"?> <plist ..... <dict> ... ... <key>LSEnvironment</key> <dict> <key>PATH</key><string>CONTENT OF YOUR $PATH</string> </dict> </dict>
然后你需要刷新macOS缓存
您已完成,SourceTree现在应该能够使用gcloud凭据。
使用密码 :
如今,这样做很容易。 我在 Microsoft Windows 11 OS 机器上。
首先,按照以下说明在 Google Cloud (gcloud) Repositories 上创建存储库:
然后,安装 SourceTree,如果你没有的话。
在 SourceTree 上,导航到“添加”选项,以便浏览到本地计算机上刚刚克隆的存储库。
您已准备好拨打 go。您可以在 Google 云存储库上提交代码。
最好的祝福
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.