GIT support in PrimalScript

Support for all customers who have purchased a PrimalScript product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
cking2
Posts: 60
Joined: Wed Sep 03, 2008 2:14 am
Location: Winona, Minnesota, USA

GIT support in PrimalScript

Post by cking2 » Wed Aug 01, 2018 7:12 am

Windows 10 1803, build 17134.165 64 bit
PS 7.4.115.0

Having some issue getting GIT to work with an existing folder that is in source control. https://www.sapien.com/blog/2018/07/02/ ... l-support/ mentions that you assuming it is NOT an existing folder. I 'think' in theory it should work with an existing repo?

First off, not a GIT expert but have been successfully using GIT with our local bitbucket repos on-premise. So, forgive my possible incorrect usage of terms.

c:\git is already has a few sub-folders 'pointing' at some various repos.

If I open a script from one, it seems that from PS it is 'git aware'.

# make small change
git add
[master 1853cc1] Initial commit
1 file changed, 1 insertion(+)

git commit -m "test using ps" # entered comment in PS message entry popup
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

nothing to commit, working tree clean # using git normally (from command line) I would expect some message about the commits

The commit just does not seem to work. Doing a git log simply never shows any entries associated with running this from PS. Doing a push fails also.

git push
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The push seems a verification issue. I tried to generate a key but it looks like it defaults to user@machinename regardless of setting my username by going to GUI (from PS) and then entering it there as user@domain.com.
Also, once I generate a key in PS GUI, does not seem an option re-generate/delete existing key.
Any thoughts or is that the next article?

User avatar
Alexander Riedel
Posts: 6671
Joined: Tue May 29, 2007 4:43 pm

Re: GIT support in PrimalScript

Post by Alexander Riedel » Wed Aug 01, 2018 10:46 am

All PrimalScript does is calling the command line tools of Git. The details to that will be in the next article for sure, but we are not doing anything special.
If Git works from a command shell, it will work from PrimalScript. If it does not work from the command line, well, it will also not work from PrimalScript.
If you have permission issues, you have them from the command line as well.

You can look at this folder "C:\ProgramData\SAPIEN\Version Control Providers" and open the git.inf file there to see what commands we run.
Edit this file at your own risk of course and it will be overwritten when the next version is installed.
Alexander Riedel
SAPIEN Technologies, Inc.