Anyone know how to configure GIT and/or SAS on Unix and/or Windows so that the new GITFN_CLONE() etc commands can find it?
39 %let src=https://github.com/sasutils/macros.git ; 40 %let target=%sysfunc(pathname(work)) ; 41 data _null_; 42 rc= gitfn_clone("&src","&target"); 43 put rc=; 44 run; NOTE: GIT2.DLL not found in the system location, trying the extension path. NOTE: GIT2.DLL not found in the extension path, trying the install path. ERROR: Unable to load libgit2 module. rc=-1
One last thing, do you have M6?
Bart
Do you have git or github client installed on your system?
Bart
I can use GIT command from command line on my PC. Not sure where it is installed.
In SAS
x cd "&githome" ;
x "git checkout master";
x "git pull origin master";
Or command window
PS H:\> git --version git version 2.18.0.windows.1 PS H:\>
Not sure, but maybe this could help:
Bart
one more thought, maybe try to create empty sub-directory in the work, like:
options dlcreatedir;
libname git "%sysfunc(pathname(work))/git";
data _null_;
rc = gitfn_clone ( /*1*/
"https://github.com/yabwon/SAS_PACKAGES.git", /*2*/
"%sysfunc(pathname(git))"); /*3*/
put rc=; /*4*/
run;
Bart
One last thing, do you have M6?
Bart
Switching from SAS 9.4M5 to SAS 9.4M7 seems to have fixed this. Also for cloning pointing at an empty directory is important.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.