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

Feature: add functionality to push to private repository #22

Open
Hellseher opened this issue Aug 9, 2021 · 2 comments
Open

Feature: add functionality to push to private repository #22

Hellseher opened this issue Aug 9, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Hellseher
Copy link

repo-visualizer is failing to push changes back to private repo:

/usr/bin/git commit -m Repo visualizer: updated diagram
[main fd9d4bb] Repo visualizer: updated diagram
 1 file changed, 1 insertion(+), 11 deletions(-)
 rewrite docs/repviz.svg (100%)
/usr/bin/git push
fatal: could not read Username for 'https://github.com': No such device or address
(node:2291) UnhandledPromiseRejectionWarning: Error: The process '/usr/bin/git' failed with exit code 128
    at ExecState._setResult (/home/runner/work/_actions/githubocto/repo-visualizer/main/index.js:935:21)
    at ExecState.CheckComplete (/home/runner/work/_actions/githubocto/repo-visualizer/main/index.js:921:16)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/githubocto/repo-visualizer/main/index.js:824:21)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:2291) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2291) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Wattenberger Wattenberger added help wanted Extra attention is needed enhancement New feature or request good first issue Good for newcomers labels Aug 9, 2021
@ageorgou
Copy link
Contributor

For what it's worth, I don't seem to be getting the error with private repositories. Here is a minimal configuration:

name: Test push
on: [push]
jobs:
  mypush:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: git remote -v
      - name: Update diagram
        uses: githubocto/repo-visualizer@0.6.1
        with:
          output_file: "images/diagram.svg"
          excluded_paths: "dist,node_modules"
Output:
/usr/bin/git commit -m Repo visualizer: updated diagram
[master 3c7f621] Repo visualizer: updated diagram
 1 file changed, 1 insertion(+), 1 deletion(-)
 rewrite images/diagram.svg (92%)
/usr/bin/git push
To https://github.com/ageorgou/my-private-repo
   09eefdd..3c7f621  master -> master
All set!

In principle, the checkout action should set up the remote so that authentication works automatically in the next steps.

@benganellison
Copy link

this error occurs on pull_request and not on push. had it working fine for push during testing but when updating to pull_request and made a pull_request it failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants