BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
yabwon
Amethyst | Level 16

One last thing, do you have M6?

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



View solution in original post

6 REPLIES 6
yabwon
Amethyst | Level 16

Do you have git or github client installed on your system?

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Tom
Super User Tom
Super User

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:\>     
yabwon
Amethyst | Level 16

Not sure, but maybe this could help:

https://stackoverflow.com/questions/6313203/unable-to-load-dll-git2-dll-the-specified-module-could-n...

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



yabwon
Amethyst | Level 16

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

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



yabwon
Amethyst | Level 16

One last thing, do you have M6?

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Tom
Super User Tom
Super User

Switching from SAS 9.4M5 to SAS 9.4M7 seems to have fixed this.  Also for cloning pointing at an empty directory is important.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1827 views
  • 0 likes
  • 2 in conversation