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
Onyx | Level 15

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
Onyx | Level 15

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
Onyx | Level 15

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
Onyx | Level 15

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
Onyx | Level 15

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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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