Change git credential storage setting in Business Application Studio
source link: https://blogs.sap.com/2023/12/14/change-git-credential-storage-setting-in-business-application-studio/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Change git credential storage setting in Business Application Studio
I recently ran into a problem where no matter what I did, BAS just didn’t want to save my git credentials. I found a lot of articles that proposed changing the built in git configuration to “store”, or change its cache timeout to be longer. But most of these settings only worked temporarily or didn’t produce any result at all.
After digging through the git config I found the following solution:
- Make sure autofetch is not enabled (Settings/Extensions/Git/Autofetch). You can reenable it after you have completed all the following steps.
- Open a terminal and execute:
basctl --command sapbas.gitAuthenticationGetBuiltinHelperName
This brings up a menu at the top of the window, allowing you to select between the two available options. Use this to select the option you prefer.
- Edit the gitconfig file to reinitialize the BAS git credential helper on the next authentication:
nano ~/.gitconfig
change the line with
helper = /home/user/.bas-git/bas-git-helper.sh
helper = /home/user/.bas-git/bas-git-helper-init.sh
and make sure to save your changes!
- Execute a git command that needs your credentials (e.g. Fetch) through either the built in git client or the terminal and enter your valid credentials.
- (Optional) If an error regarding an unset email appears, you can set it with
git config --global user.email "[email protected]"
Git should now work as intended. The changed settings should also be persistent across Space restarts.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK