Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitpod should clone a fork #1253

Closed
jorgeorpinel opened this issue May 6, 2020 · 7 comments
Closed

Gitpod should clone a fork #1253

jorgeorpinel opened this issue May 6, 2020 · 7 comments
Labels
help wanted Contributors especially welcome type: enhancement Something is not clear, small updates, improvement suggestions

Comments

@jorgeorpinel
Copy link
Contributor

Extracted from #1226 (comment) and #1226 (comment)

I tried using Gitpod from https://dvc.org/doc/user-guide/contributing/docs#development-environment to submit a change. It was all working nicely, (I even installed a VS Code plugin to the IDE.) But after committing with Git, I'm unable to push because I didn't grant Gitpod permission to push directly to dvc.org

image

Open source contributors will never have this permission. Can it be made so a fork is created in their accounts first, and then Gitpod launched from there?


For example, I tried with another account I own, @AyokVoluntarios, which doesn't have push access to this repo, but it also cloned the upstream directly:

image

So again, even if I tell Github to let Gitpod push to my repos, I simply can't do it from that account.

image

The user would need to configure the Git remote and branch manually from the IDE. Do you know whether that's the only solution, @nisarhassan12? Thanks

@jorgeorpinel jorgeorpinel added type: enhancement Something is not clear, small updates, improvement suggestions help wanted Contributors especially welcome labels May 6, 2020
@jorgeorpinel jorgeorpinel changed the title Gitpod shuold use a fork Gitpod should clone a fork May 6, 2020
@nisarhassan12
Copy link
Contributor

nisarhassan12 commented May 6, 2020

I tried using Gitpod from https://dvc.org/doc/user-guide/contributing/docs#development-environment to submit a change. It was all working nicely, (I even installed a VS Code plugin to the IDE.) But after committing with Git, I'm unable to push because I didn't grant Gitpod permission to push directly to dvc.org

Thanks, @jorgeorpinel This is happening maybe because you have not granted Gitpod the permissions to do so. You can manage the access control here: https://gitpod.io/access-control/

image

Open source contributors will never have this permission. Can it be made so a fork is created in their accounts first, and then Gitpod launched from there?

When a repo is opened where you don't have push access and you have made a change and are about to commit, A prompts appears from where one can fork and then push to his fork. Another way to fork is F1 > Fork. I think it would be nice if it's documented in the projects contributing guide.

image

@jorgeorpinel
Copy link
Contributor Author

You can manage the access control

Unfortunately Gitpod wants access to manage repo settings and development keys so I don't feel comfortable giving it those permissions from my account, since I have admin access to the repo. Maybe for a developer in an org this would be OK but they will probably have a local dev env anyway.

image

When a repo is opened where you don't have push access and you have made a change and are about to commit, A prompts appears from where one can fork and then push to his fork. Another way to fork is F1 > Fork. I think it would be nice if it's documented in the projects contributing guide.

Yes, we would need to document this in the Gitpod block quote in https://dvc.org/doc/user-guide/contributing/docs#development-environment, would you like to send a PR @nisarhassan12? Feel free to use a <details> hidden section (example in https://dvc.org/doc/tutorials/get-started/configure)

But it may be turning a little complicated. Not sure how useful it will result. It's definitely a good option to have but... Casual contributors can make small changes directly from Github, and regulars will probably want to run things locally. For example it takes much longer to run the local dev server on Gitpod than on my Windows laptop. But anyway, if you can help us explain the whole process including forking etc up till the pull request is submitted (hopefully it's only a few steps) that would be great.

@jorgeorpinel
Copy link
Contributor Author

I'm removing the note for now, please revert 87906e2 and complete the guide when possible. Thanks

@nisarhassan12
Copy link
Contributor

Thanks! I'll make a PR soon.

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented May 8, 2020

No rush. Thank you!

@nisarhassan12
Copy link
Contributor

Hey @jorgeorpinel I have already made this PR #1262

@shcheklein
Copy link
Member

Closing this, see motivation here #1262 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributors especially welcome type: enhancement Something is not clear, small updates, improvement suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants