Git Push error
See original GitHub issueHello 👋, I’m using Isomorphic Git on a NodeJS environment, and I’m having an issue pushing a repo using the following code:
(async function push() {
const rPath = process.argv[2]
const email = process.argv[3]
const passwd = process.argv[4]
console.log(rPath, email, passwd)
try {
const pushResponse = await git.push({
dir: rPath,
remote: 'origin',
ref: 'master',
username: email,
password: passwd
})
console.log(`Pushed repo at ${rPath} to origin.\nAnswer: ${pushResponse}`)
} catch(e) {
console.log(e)
}
})()
index.js:1300 TypeError: Cannot read property ‘split’ of null
Acccording to jcubic in #690, the issue comes from username
and password
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
git error: failed to push some refs to remote - Stack Overflow
(Note: starting Oct. 2020, any new repository is created with the default branch main , not master . And you can rename existing...
Read more >Error: failed to push some refs to – How to Fix in Git
When collaborating with other developers using Git, you might encounter the error: failed to push some refs to [remote repo] error.
Read more >How to Fix 'failed to push some refs to' Git Errors - Komodor
failed to push some refs to errors are often caused when changes are not committed before pushing, issues with Git pre-push hook, incorrect...
Read more >Git Push Errors - Cribl Docs
Your first push to a remote repo might fail with one of several failed to push some refs errors. As a first step...
Read more >Git Error | GitHub Error: failed to push some refs to '[REPO URL]'
Are you starting to use Git / GitHub and just came across the message " failed to push some refs to ..."?Don't worry,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Realized you need to use the proper
dir
that you create programmatically and not the just/
(like the docs example).As in the dir at
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "myTmpDir"))
vs/
if you’re following the starter tutorial.Getting the same error when trying to push as well. I get through the node starter flow fine - writing a new file and ability to commit.