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
These functions are quite recent, introduced with SAS 9.4M6.
Please report your SAS version by posting the log of
%put &SYSVLONG4;
Version= 9.04.01M5P09132017
@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.
Thank You.
Is it possible to do with UNIX?
@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.
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
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.
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>"
@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).
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!
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.
Ready to level-up your skills? Choose your own adventure.