Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
empujando cambios a git usando nodo

Estoy tratando de confirmar y enviar cambios usando el nodo sin usar ningún paquete npm externo

 const { spawn,exec } = require('child_process'); const fs = require('fs'); const { stderr } = require('process'); (async ()=>{ if(fs.existsSync('./repo_dir')) fs.rmSync('./repo_dir',{recursive:true}); exec(`git config --global --replace-all user.name "NAMEHERE" && git config --global --replace-all user.email "EMAIL@gmail.com" && git config --list`,(err,stdout,stderr)=>{ if(err) console.log(`error: ${err}`); if(stderr) console.log(`stderr: ${stderr}`); console.log(`stdout: ${stdout}`); let git_spawn=spawn(`git`,[`clone`,`https://username:token@github.com/username/repo_dir.git`]); git_spawn.stdout.on("data", data => { console.log(`cloning stdout: ${data}`); }); git_spawn.stderr.on("data", data => { console.log(`cloning stderr: ${data}`); }); git_spawn.on('error', (error) => { console.log(`cloning error: ${error.message}`); }); git_spawn.on("close", code => { console.log(`child process exited with code ${code}`); exec(`cd ./git_repo && touch blank.js && git add -A && git commit -m "updating" && git push && cd ..`,(err,stdout,stderr)=>{ //error somewhere here console.log(`pushing error: ${err}`); console.log(`pushing stdout: ${stdout}`); console.log(`pushing stderr: ${stderr}`); }); }); }) })();

pero por alguna razón no funciona y ni siquiera puedo señalar el error
producción:

stdout: clonación stderr: Clonación en 'repo_dir'...

el proceso secundario salió con el código 0 presionando el error: Error: Comando falló: cd ./repo_dir && touch blank.js && git add -A && git commit -m "updating" && git push && cd ..

empujando stdout: en la rama principal Su rama está actualizada con 'origen/principal'.

nada que cometer, árbol de trabajo limpio

empujando stderr:

Supongo que el problema está en algún lugar al comprometerse y empujar

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!