Skip to content
Snippets Groups Projects
Commit 198c9b89 authored by Matus Balogh's avatar Matus Balogh
Browse files

adding project token for push/pull authorization

parent 571e019d
No related branches found
No related tags found
No related merge requests found
bla
bla
bla
bla
......@@ -98,7 +98,7 @@ void processGit(string filename)
string newfile = nf;
newfile = oldname + newfile + "__" + GetMachineID() + ".json";
//we must pull the submodule first to ensure all is up to date
if (system("git --git-dir=./caenslowcontrol_json/.git pull > gitlog.txt") != 0)
if (system("git --git-dir=./caenslowcontrol_json/.git pull https://autopush_token:N4XGrjZrQXTFikvtZ3Co@baltig.infn.it/gamma/caenslowcontrol_json > gitlog.txt") != 0)
{
ShowError("git --git-dir=./caenslowcontrol_json/.git pull > gitlog.txt");
return;
......@@ -121,7 +121,7 @@ void processGit(string filename)
//git add
path = PROJECT_NAME;
cmd = "git --git-dir=./caenslowcontrol_json/.git add " + path + "/" + newfile + " >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git add " + path + "/" + newfile + " > gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......@@ -131,7 +131,7 @@ void processGit(string filename)
//git commit
string commit = "\"autopush of " + newfile + "\"";
cmd = "git --git-dir=./caenslowcontrol_json/.git commit -m " + commit + " >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git commit -m " + commit + " > gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......@@ -139,7 +139,7 @@ void processGit(string filename)
}
//git push
cmd = "git --git-dir=./caenslowcontrol_json/.git push >> gitlog.txt";
cmd = "git --git-dir=./caenslowcontrol_json/.git push https://autopush_token:N4XGrjZrQXTFikvtZ3Co@baltig.infn.it/gamma/caenslowcontrol_json > gitlog.txt";
if (system(cmd.c_str()) != 0)
{
ShowError(cmd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment