Unable to push to empty repository on GitHub
See original GitHub issueFirst of all: thanks for this wonderful library. It seems to be exactly what I need.
I am experimenting with this a bit (Firefox 57) and I can’t get a simple clone-edit-commit-push cycle to work. What am I doing wrong. In the <head>
of my html I have included isomorphic-git and browserfs as instructed. In the body I have a script tag containing:
git('.').clone('https://cors-buster-jfpactjnem.now.sh/github.com/wDhTIG/rthKRF');
fs.writeFile('README.md', 'Test', 'utf8', (err) => {
if (err) throw err;
console.log('The file has been saved!');
});
git('.').auth('mysecret')
.add('README.md')
.commit('Test commit')
.push('master');
I get the following errors in the console log:
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. git.html Unhandled promise rejection TypeError: l(…) is undefined Stack trace: e/<@https://unpkg.com/isomorphic-git:1:80863 n@https://unpkg.com/isomorphic-git:1:125272 f/<@https://unpkg.com/isomorphic-git:1:126316 o/</e[t]@https://unpkg.com/isomorphic-git:1:125448 i@https://unpkg.com/isomorphic-git:1:120912 i/<@https://unpkg.com/isomorphic-git:1:121012 B/</<@https://unpkg.com/isomorphic-git:1:273404 B/<@https://unpkg.com/isomorphic-git:1:273274 f@https://unpkg.com/isomorphic-git:1:257078 isomorphic-git:1:273747 Source map error: request failed with status 404 Resource URL: https://unpkg.com/isomorphic-git Source Map URL: bundle.umd.min.js.map
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (9 by maintainers)
Top GitHub Comments
Would it be possible for you to create an example repository on github such that:
This would provide a sort of skeleton upon which I could build further. For example, as a first project, to test whether I get how this works, I would then try to evolve my clone into an online github editor, provide a basic file browser + codemirror frame for editing & writing commit messages.
I just confirmed I am able to push to an empty repository on Github:
Also, after adding a remote and creating a new branch, I was able to push that new branch:
Since I’d renamed this issue to “Unable to push to empty repository on GitHub” and that appears to not be a problem anymore, I shall close this issue. But continue to create new issues and to chat in Gitter as you encounter new obstacles!