BookmarkSubscribeRSS Feed
chithra
Quartz | Level 8

Dear All,

 

I need to checkout a program from git server to unix server. and i tried via sas using the below program.

 

data _null_;
version = gitfn_version();
put version=;

rc = gitfn_clone("git_path",
"server_path");
put rc=;
run;

 

I am getting the error - ERROR: Unable to load libgit2 module.

Do i need to configure anything? if so could you please help to solve this? 

 

Thanks in advance,

Chithra

 

9 REPLIES 9
chithra
Quartz | Level 8

Version= 9.04.01M5P09132017

Kurt_Bremser
Super User

@chithra wrote:

Version= 9.04.01M5P09132017


Which means you have 9.4M5. These functions are not yet implemented in this release. If you want to use them, have your SAS administrator update the system to 9.4M6.

chithra
Quartz | Level 8

Thank You.

Is it possible to do with UNIX?

Kurt_Bremser
Super User

@chithra wrote:

Thank You.

Is it possible to do with UNIX?


If you have XCMD enabled, you can run external commands from your SAS session. Anything you can do from the commandline when loggend on with your SAS user can also be done from the SAS session, using one of the multiple methods (x statement, call system() routine or system() function, filename pipe) SAS provides for this.

chithra
Quartz | Level 8

yes it is enabled. i can use X command.

Could you please guide me how to clone git code in to unix server via this?

 

Thanks,

Chithra

Kurt_Bremser
Super User

I'm no git expert in any way (I know that it exists and that it is a source code control tool, but that's it), but I can show you my preferred way of running external commands:

filename oscmd pipe "your_command_goes_here 2>&1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

filename oscmd clear;

All messages (including messages to stderr, that's what the 2>&1 is for) will appear in the SAS log.

chithra
Quartz | Level 8

In UNIX, can we execute git command?

 

I try executing git clone, But it asks for password. I don't know which password should be given.

 

Usually git clone is working using the below command

git clone "https://<git token>@<git url>"

 

 

Kurt_Bremser
Super User

@chithra wrote:

In UNIX, can we execute git command?

 

I try executing git clone, But it asks for password. I don't know which password should be given.

 

Usually git clone is working using the below command

git clone "https://<git token>@<git url>"

 

 


Your git admin will be able to supply such essential information. We can't know your passwords (if we did, you'd be in for a load of pain).

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 9 replies
  • 3344 views
  • 0 likes
  • 2 in conversation