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.
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: