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

Can't push changes to Github workflows if VS Code authenticated as OAuth Github app #97396

Closed
tysonite opened this issue May 10, 2020 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@tysonite
Copy link

Issue Type: Bug

  • Authenticate VS Code as OAuth App on Github
  • Modify .github/workflows/<any_file>
  • Commit & Push

Error will appear:

 ! [remote rejected] master -> master (refusing to allow an OAuth App to create or update workflow `.github/workflows/test.yml` without `workflow` scope)

VS Code version: Code 1.45.0 (d69a79b, 2020-05-07T16:18:48.860Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info
Item Value
CPUs Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 x 2400)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.82GB (2.97GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-18.04
OS Linux x64 4.4.0-18362-Microsoft
CPUs Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 x 2400)
Memory (System) 7.82GB (2.97GB free)
VM 0%
Extensions (4)
Extension Author (truncated) Version
python ms- 2020.4.76186
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.2
@tysonite tysonite changed the title Can't push changes to workflows Can't push changes to Github workflows if VS Code authenticated as OAuth Github app May 10, 2020
@joaomoreno
Copy link
Member

joaomoreno commented May 12, 2020

Oh that's pretty rough. Maybe let's add a workflow scope to it.

@RMacfarlane How easy is it to redefine the scopes for an existing credential, which users might already have cached?

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug git GIT issues labels May 12, 2020
@joaomoreno joaomoreno added this to the May 2020 milestone May 12, 2020
@RMacfarlane
Copy link
Contributor

Unfortunately it's not possible to modify an existing token to add scopes, a new one has to be requested with the additional scopes

@joaomoreno
Copy link
Member

@RMacfarlane What I meant to ask was: users will simply get asked to go through the flow once again if I change the scopes here, right? https://github.com/microsoft/vscode/blob/master/extensions/git/src/github.ts#L23-L23

@RMacfarlane
Copy link
Contributor

Yep, that's correct!

@JacksonKearl
Copy link
Contributor

Whats the process for registering VSCode as an OAuth app?

@joaomoreno
Copy link
Member

@JacksonKearl This is the automatic git auth in VS Code: if you try to pull/push from a git repo using HTTPS, authentication will happen automatically with the GH auth provider.

Steps:

  1. Clone a repo from GitHub
  2. Make a change to a workflow file
  3. Push

@joaomoreno joaomoreno removed the verification-steps-needed Steps to verify are needed for verification label Jun 5, 2020
@JacksonKearl
Copy link
Contributor

JacksonKearl commented Jun 5, 2020

Havent been able to repro the initial error in Stable. Steps:

In a VM without my git auth already registered:

  • Clone a repo via the integrated clone over https
  • add workflow file.
  • native-looking popup asks me to log in to github
  • log in, push goes through.

This is on Windows 10

@joaomoreno joaomoreno added the verified Verification succeeded label Jun 8, 2020
@joaomoreno
Copy link
Member

Maybe it's specific to the workflow or to our auth. I also didn't repro before the change.

Marking as verified.

@WouterDeKort
Copy link

I have the same issue when using Visual Studio CodeSpaces. I've cloned a repo with a workflow file, made a change to the workflow file and now get the error on push that my OAuth App doesn't have the workflow scope.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@joaomoreno @tysonite @WouterDeKort @RMacfarlane @JacksonKearl and others