GIT support in PrimalScript

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
cking2
Posts: 62
Last visit: Tue Mar 29, 2022 6:55 am

GIT support in PrimalScript

Post by cking2 »

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: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: GIT support in PrimalScript

Post by Alexander Riedel »

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.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.