Reputation: 3958
I just created a new Repo in Google Cloud and wanna use the Source Tree app as controllers for my git interactions.
But I keep been asked this password for push.
Is no my Google account password I already setup the 2-verification password, but still not able to create this password.
EDIT: If I try to follow this guide Set Up a Google Cloud Git Repo In SourceTree
It says:
On Step 2 there is no "source code/releases" option
And If I try to go on Step 4 "Git Credentials", in credentials only have API Credentials, not Git.
Upvotes: 1
Views: 3333
Reputation: 487
Nowadays, it's easy to do so. I am on Microsoft Windows 11 OS machine.
Firstly, follow these instructions on creating a repository on Google Cloud (gcloud) Repositories:
Then, install the SourceTree, if you do not have one.
On SourceTree, navigate to the "Add" option, in order to browse to just cloned repository on your local machine.
And you are ready to go! You can commit the code on your Google Cloud Repositories.
Best regards
Upvotes: 0
Reputation: 721
Recomended way (with gcloud credentials)
I found a workaround to get it work (macOS):
cd myproject
git config credential.helper gcloud.sh
You must be authenticated in your local gcloud
CLI and have it in your $PATH
.
Then start SourceTree through the Terminal:
open /Applications/SourceTree.app/Contents/MacOS/SourceTree
This will propagate your $PATH
to SourceTree in order to make the script git-credentials-gcloud.sh
available.
I managed to find a solution that does not involved the Terminal. You should add the following in the Info.plist of the SourceTree.app package (/Applications/SourceTree.app/Contents/Info.plist
), at the end of the main <dict>
item:
<?xml version="1.0" encoding="UTF-8"?>
<plist .....
<dict>
...
...
<key>LSEnvironment</key>
<dict>
<key>PATH</key><string>CONTENT OF YOUR $PATH</string>
</dict>
</dict>
Then you need to flush the macOS cache by
You are done, SourceTree should now be able to use the gcloud credentials.
With password:
Upvotes: 3