repo-visualizer icon indicating copy to clipboard operation
repo-visualizer copied to clipboard

Feature: add functionality to push to private repository

Open Hellseher opened this issue 4 years ago • 2 comments

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.

Hellseher avatar Aug 09 '21 10:08 Hellseher

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/[email protected]
        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.

ageorgou avatar Aug 21 '21 23:08 ageorgou