theia: [git] Permission denied issues when executing `pull` and `push`
Moved from: https://github.com/theia-ide/theia/issues/583#issuecomment-336096605 Original message from @marcdumais-work:
I am trying the git extension using my Theia development environment. I have a few remotes defined. ATM I see that for pull and push operations, a random remote is picked (1st returned by “git remote” ?). It happens to be one I do not have permissions to push-to, and that doesn’t contain the branch I am working on, so push and pull operations fail. Fetch doesn’t seem to do anything and outputs no error message.
I guess these problems will be addressed in this issue by permitting to pick a specific remote for the operations?
push:
The command `git push antoine task` exited with an unexpected code: 1. The caller should either handle this error, or expect that exit code.
To github.com:hexa00/theia.git
! [remote rejected] task -> task (permission denied)
error: failed to push some refs to 'git@github.com:hexa00/theia.git'
pull:
The command `git pull antoine` exited with an unexpected code: 1. The caller should either handle this error, or expect that exit code.
You asked to pull from the remote 'antoine', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
PR: #650.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (21 by maintainers)
Commits related to this issue
- GH-621: Added API for getting the remotes for a given repository. This will be used by the clients when running `pull`, `push`, and `fetch`. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Initial implementation of the quick open service for Git. This can be used for further refining the Git commands. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Added API for getting the remotes for a given repository. This will be used by the clients when running `pull`, `push`, and `fetch`. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Initial implementation of the quick open service for Git. This can be used for further refining the Git commands. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Exposed branch as an object to the Git API. Adjusted quick open service for Git, so that it proposes all the branches from an upstream if that differs from the configured upstream of the cur... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Gracefully handled no-repositories on the UI. Updated Git repository provider API, exposed all know repositories. Also added the `refresh` method to be able to update its internal state from ... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Exposed `branch` to `git pull` options. It is required when pulling from a remote which is not the default remote of the currently active branch. Signed-off-by: Akos Kitta <kittaakos@gmail.c... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: From now on Git resource uses repository provider. Instead of fetching the repositories from the backend. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Adjusted command and context menu labels for Git. Commands will be prefixed with `Git`, it is not the case for the context menu items. That would be redundant information in the Git widget. ... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Minor cleanup and UI polishing in the Git open service. - Getting the currently selected repository is synchronous. - Show the name of the currently active branches. Signed-off-by: Akos K... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Added API for getting the remotes for a given repository. This will be used by the clients when running `pull`, `push`, and `fetch`. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Initial implementation of the quick open service for Git. This can be used for further refining the Git commands. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Exposed branch as an object to the Git API. Adjusted quick open service for Git, so that it proposes all the branches from an upstream if that differs from the configured upstream of the cur... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Gracefully handled no-repositories on the UI. Updated Git repository provider API, exposed all know repositories. Also added the `refresh` method to be able to update its internal state from ... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Exposed `branch` to `git pull` options. It is required when pulling from a remote which is not the default remote of the currently active branch. Signed-off-by: Akos Kitta <kittaakos@gmail.c... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: From now on Git resource uses repository provider. Instead of fetching the repositories from the backend. Signed-off-by: Akos Kitta <kittaakos@gmail.com> — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Adjusted command and context menu labels for Git. Commands will be prefixed with `Git`, it is not the case for the context menu items. That would be redundant information in the Git widget. ... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Minor cleanup and UI polishing in the Git open service. - Getting the currently selected repository is synchronous. - Show the name of the currently active branches. Signed-off-by: Akos K... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Added the required Git version to prerequisites. It should be 2.11.0 or higher. Otherwise `--porcelain=2` cannot be used to parse the Git status output from the command line. Signed-off-by: ... — committed to eclipse-theia/theia by kittaakos 7 years ago
- GH-621: Fixed a repository selection-related glitch on the UI. Previously, the drop-down selection index was not set, hence the item with the 0th index was set as the selected repository. It caused a... — committed to eclipse-theia/theia by kittaakos 7 years ago
@kittaakos yes, when I keep a single remote (my own fork) I can then pull and push.
@kittaakos no problem, I’ll do it