Jump to content

Daniel290499

New Members
  • Posts

    7
  • Joined

  • Last visited

Daniel290499's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeah, I tried proc_. I couldn't get it to work. Have you got a working example? This is why I say, it's not about git. I'll setup my git properly, no problem. But this now is about learning something new That's why the title is about entering data in an executed command. It just so happens that I stumbled upon this, while fiddling with a local git server. Regardless of whether I use this for git, I want to add more knowledge to my PHP tool belt. You get what I'm saying?
  2. Thanks for all that. I'll check out the SSH stuff. What if it's another command and not git? Let's say 'x-command' that you run via exec() requires an input; how would you input that data via a script?
  3. Hi requinix Security isn't an issue, as the git server is on my local machine. At this point, it's really more about trying to figure out how to do this. It's an itch I need to scratch. There must be a way to automatically fill in a response, from a response of an executed command. You know what I mean?
  4. O yes. Right you are. Good catch. Points for being close...?
  5. You can use array_push() to add elements to an array. $newArray = array(); $newArray['boss'] => $row['bossid']; $newArray['tasks'] => $row['tasks']; $newArray['timeframe'] => $row['tframe']; array_push($_SESSION['users'] , $newArray); Instead of creating $newArray, you can just insert $row into the array. I did it this way because I don't know what else is in $row. It's a personal choice, but I break up my code a lot. I hope this helps
  6. Hello all I'm new to this forum. I've been struggling on this problem for a few days now. I’m writing a script to automatically push code to a git server. I’m using php and running the script via the command line. After asking the user to enter the branch and commit message, the following code runs: exec(‘git config user.name "’ . $userName . ‘"’); exec(‘git config user.email "’ . $userEmail . ‘"’); exec('git checkout -b ’ . $branch); exec(‘git add --all’); exec(‘git commit -m "’ . $message . ‘"’); exec('git push origin ’ . $branch); When running the last command, the script stops and asks for a user name, then a password. How can I enter that username and password via the script? I don’t want to have to type in the user name and password each time. As I said, I've been stuck on this for 2 days now. I tried other forums, searching the net. I'm frustrated... Thanks in advance. Have a lovely day.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.