codesandbox-client
codesandbox-client copied to clipboard
Cannot create Github repo from a Sandbox `Not able to push sandbox to a remote repository`
🐛 bug report
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.
Description of the problem
Signin via Github.
I create a project in CodeSandbox then try to create a repo on Github on my personal account.
The UI shows this error "Not able to push sandbox to a remote repository"
I debug the error on the browser console and get the following error.
ConvertToRepositoryForm.tsx:140 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'owner')
at ConvertToRepositoryForm.tsx:140:28
at s (runtime.js:63:40)
at Generator._invoke (runtime.js:294:22)
at Generator.next (runtime.js:119:21)
at r (asyncToGenerator.js:3:20)
at s (asyncToGenerator.js:25:9)
(anonymous) @ ConvertToRepositoryForm.tsx:140
s @ runtime.js:63
(anonymous) @ runtime.js:294
(anonymous) @ runtime.js:119
r @ asyncToGenerator.js:3
s @ asyncToGenerator.js:25
Promise.then (async)
r @ asyncToGenerator.js:13
s @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ ConvertToRepositoryForm.tsx:126
We @ react-dom.production.min.js:52
Ke @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
Er @ react-dom.production.min.js:100
Pr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
je @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Mr @ react-dom.production.min.js:105
Jt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
Wa @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
Xt @ react-dom.production.min.js:73
At the end create a Github repo here, but without any file of the project. Only a Codesandbox template.
How has this issue affected you? What are you trying to accomplish?
Create a repo in Github from a project in CodeDandbox
To Reproduce
I try setting public, private, different repo names, but not luck.
I think is related to the system doesn't select the default Github organization or CodeSandbox workspace.
Error line in the code:
Link to sandbox: link (optional)
Your Environment
Software | Name/Version |
---|---|
Сodesandbox | c64c763 |
Browser | Chrome |
Operating System | Macos |
I'm having this too
same here
I was able to create a repo one or two times from codesandbox's angular project a few days ago but after that I have been encountering this issue as well. After creating a codesandbox project and following through with "create repository" in codesandbox, the UI shows this error "Not able to push sandbox to a remote repository" and my github repo list shows that the repo was made but the code isn't there. just a readme. Browser: Chrome, OS: Win10, using the web codesandbox.
edit: noticed when selecting "Angular" (cloud) in codesandbox, it seems I can create github repo from codesandbox but the "Angular CLI" (cloud) I can't. I wanted an angular 15 project and not a 16 which the "Angular" (cloud) is by default and push the project to github but it seems I cannot until the issue is resolved.
Have you solve it?
Has anyone solved it ?
Same here today.
I get this on CodeSandbox:
And here's the generated empty project in my Github: https://github.com/samuelpath/json-candidates-ranker-marvin
Got the exact same screen as samuelpath above
Hello all,
I'm sorry to hear about the trouble you've been having trying to connect your Sandbox to a repository.
Please could you all go to your dashboard > Settings > Integrations and then remove and re-add your Github credentials?
This should refresh the relevant token and resolve the problem
Thanks for the suggestion, James.
I removed and re-added my GitHub credentials but this did not resolve the issue. I still get the "Not able to push sandbox to remote repository" error. And an empty repository of the name I typed in is created in my GitHub account.
Thanks @matt-scott -
Please could you contact us at [email protected] from the email associated with your account?
If you could also let us know whether you're trying to import a private or public repository in that email. That would be fantastic!
Thank you everyone for your patience regarding this issue,
I've now been able to reproduce and find a work around on our end while we work on a longer term solution.
This only seems to happen when trying to link a Sandbox directly to a repository, if you use the 'Convert to Devbox' prompt in the top right and then connect the project to a repository, it will connect as expected.
Because our repositories run in the same type of environment as Devboxes, there is no change in the final result. This is just an extra step for the moment.
This resolves the issue. Thanks James!
Convert to Devbox
where is this option?
i tried doing this, the repository is created but nothing is visible on browser
@Lakshyaultimate Please contact us at [email protected] with a link to the environment in question