Technical Articles
Business Application Studio Git Workaround
I’ve started using Business Application Studio (BAS, the replacement for SAP Web IDE) and I think it shows great potential. It’s especially good if you are a Visual Studio Code user, because then the layout is very familiar. Direct access to the terminal brings great power and flexibility. There are quite a few wrinkles yet to be ironed out though, and I wanted to share a workaround for an issue that had been frustrating me.
When I first clone a Git repository I’m prompted for my Git credentials as expected. When I return to the BAS dev space next day however, and I hit the synchronize button (to pull/push changes from/to origin), I don’t get a prompt to enter my credentials again. I just get this error:
Request fetch failed with message: fatal: could not read Username for ‘https://github.com’: No such device or address
It’s actually an issue in the underlying Theia IDE. To get around it you can open a terminal (menu Terminal->New Terminal) and request caching of your credentials:
$ git config credential.helper cache –timeout=36000
Next do a fetch, and then you will be prompted to enter your Git credentials
$ git fetch
If you hit the synchronize button now it should work fine. The timeout parameter is in seconds, so the value above will cache your credentials for 10 hours. You can also use the store command (instead of cache), but that will save your password in a plain text file.
PS Thanks to Rima @ SAP Support for helping me with this issue.
PPS If you’re quite new to Git you might like to look at the Open SAP Course SAP Cloud Platform Version Control with Git. Although it focuses on SAP Web IDE (time for an update?) Arnaldo Cavazos covers the concepts really well IMHO.
PPS Here is a tutorial on BAS: Develop Your First SAPUI5 Web App with SAP Business Application Studio
What a coincidence! Today I had the *exact* same issue, the "git fetch" eventually did the trick for me
Thanks a million Mike!
You can use $ git config credential.helper store as well.
Important security warning: Using this helper will store your passwords unencrypted on disk, protected only by filesystem permissions.
More information in https://git-scm.com/docs/git-credential-store.
In addition, you can use --global flag for both helpers, so that the helpers will be configured for all your projects, for example:
$ git config --global credential.helper cache –timeout=36000
Hi, thanks for the tip! I was successful with store, but for me the cache command did not work, and I had to use
Git - git-credential-cache Documentation (git-scm.com)
I developed a new feature for git on BAS. It should be in the production on this coming Sunday. It has a simple UI which allows to put the credentials and configures git helpers automatically.
Ira Gordin Can you please let me know the workaround for git on BAS credential cache/Store?
Workaround for what?
Please support https://github.com/GitCredentialManager/git-credential-manager