Remember what d_stranz wrote : Assuming of course that the git program is on your system's executable search path and that you have permission to execute it.
Remember what d_stranz wrote : Assuming of course that the git program is on your system's executable search path and that you have permission to execute it.
The same problem for the 2nd method :Qt Code:
QProcess process; QStringList arguments; arguments << "clone" << "ssh://user@host:port/Template.git"; process.start( "git", arguments );To copy to clipboard, switch view to plain text mode
Qt Code:
process.start("git clone ssh://user@host:port/Template.git"); if (!process.waitForStarted()) { qDebug() << "Error : " << process.errorString(); return 1; } qDebug() << "No Error "; process.waitForFinished(-1); // will wait forever until finishedTo copy to clipboard, switch view to plain text mode
Console output : No Error ===> Process starts OK ??
I have used QProcess with Gerrit without problems. exmple :===> Creates project in Gerrit OKQt Code:
process.start("ssh -p port user@host gerrit create-project test")To copy to clipboard, switch view to plain text mode
How can I be sure of it ??Assuming of course that the git program is on your system's executable search path and that you have permission to execute it
If Gerrit works without pbs ===> Git also works also ??
Simple : open system command line and type git<Enter>.
Yes, I have
I Have already used git clone on system command line whitout problem
Qprocess with Gerrit works well
QProcess with Git fails
Qt Code:
projectClone = "git clone ssh://user@host:port/Template.git"; process.start(projectClone); if (!process.waitForStarted()) { qDebug() << "Error : " << process.errorString(); return 1; } qDebug() << "No Error" ; if(process.waitForFinished()) { qDebug() << "Error Waiting : " << process.errorString(); return 1; }To copy to clipboard, switch view to plain text mode
Console output :
No Error
Error Waiting: "Unknown error"
Is exactly the same command working in command line ?
Do it need some sort of interaction ?
Yes the same :Is exactly the same command working in command line ?Qt Code:
git clone ssh://user@host:port/Template.gitTo copy to clipboard, switch view to plain text mode
No, just the previous commandDo it need some sort of interaction ?
Cmd line screenshot: Capture du 2016-05-19 14:15:53.png
I have no idea![]()
Hii,
There is no error in the programm
Qt Code:
projectClone = "git clone ssh://user@host:port/Template.git"; process.start(projectClone); if (!process.waitForStarted()) { qDebug() << "Error : " << process.errorString(); return 1; } if(!process.waitForFinished()) { qDebug() << "Error Waiting : " << process.errorString(); return 1; }To copy to clipboard, switch view to plain text mode
But, I don't see the project in my directory
With cmd line, I see the project
Before process.start() put in code :Qt Code:
To copy to clipboard, switch view to plain text mode
Thanks it works
Bookmarks