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

Github Access failed on Windows #282

Open
MaKaNu opened this issue Jan 23, 2022 · 3 comments
Open

Github Access failed on Windows #282

MaKaNu opened this issue Jan 23, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@MaKaNu
Copy link

MaKaNu commented Jan 23, 2022

Describe the bug
Creating repository from template failed, because of missing access to github.

To Reproduce
I hopefully installed finally all necessary but not really mentioned dependencies for this template. I've started creating the template and entered every informations. For the options after the License, I choosed for every option y. Afterwards an empty repository is created on github but the rest of the template setup is failing. I've provided the output below. You can also see, that something isn't working correctly with the virutalenv setup. So the recreating is not my normal procedure, I put my venv usually on project path.

Additional context

The virtual environment found in <mypath>\BiQueue\.venv seems to be broken.
Recreating virtualenv biqueue-3I_JrI2z-py3.9 in C:\Users\Admin\AppData\Local\pypoetry\Cache\virtualenvs\biqueue-3I_JrI2z-py3.9
Updating dependencies
Resolving dependencies...

Writing lock file

Package operations: 33 installs, 0 updates, 0 removals

  • Installing attrs (21.4.0)
  • Installing pyparsing (3.0.7)
  • Installing atomicwrites (1.4.0)
  • Installing colorama (0.4.4)
  • Installing distlib (0.3.4)
  • Installing filelock (3.4.2)
  • Installing iniconfig (1.1.1)
  • Installing platformdirs (2.4.1)
  • Installing pluggy (1.0.0)
  • Installing packaging (21.3)
  • Installing py (1.11.0)
  • Installing toml (0.10.2)
  • Installing six (1.16.0)
  • Installing tomli (1.2.3)
  • Installing click (8.0.3)
  • Installing coverage (6.2)
  • Installing mypy-extensions (0.4.3)
  • Installing pycodestyle (2.8.0)
  • Installing pathspec (0.9.0)
  • Installing mccabe (0.6.1)
  • Installing virtualenv (20.13.0)
  • Installing typing-extensions (4.0.1)
  • Installing tokenize-rt (4.2.1)
  • Installing pytest (6.2.5)
  • Installing pyflakes (2.4.0)
  • Installing black (21.12b0)
  • Installing flake8 (4.0.1)
  • Installing isort (5.10.1)
  • Installing mypy (0.931)
  • Installing tox (3.24.5)
  • Installing pytest-srcpaths (1.2.1)
  • Installing pytest-cov (3.0.0)
  • Installing pyupgrade (2.31.0)

Installing the current project: biqueue (0.0.1)
Initialized empty Git repository in <mypath>/biqueue/.git/
warning: LF will be replaced by CRLF in poetry.lock.
The file will have its original line endings in your working directory
[master (root-commit) a5ff123] chore: initial commit
 41 files changed, 2968 insertions(+)
 create mode 100644 .all-contributorsrc
 create mode 100644 .editorconfig
 create mode 100644 .flake8
 create mode 100644 .github/FUNDING.yml
 create mode 100644 .github/ISSUE_TEMPLATE/1-bug_report.md
 create mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.md
 create mode 100644 .github/labels.toml
 create mode 100644 .github/workflows/ci.yml
 create mode 100644 .github/workflows/hacktoberfest.yml
 create mode 100644 .github/workflows/issue-manager.yml
 create mode 100644 .github/workflows/labels.yml
 create mode 100644 .gitignore
 create mode 100644 .gitpod.yml
 create mode 100644 .idea/biqueue.iml
 create mode 100644 .idea/watcherTasks.xml
 create mode 100644 .idea/workspace.xml
 create mode 100644 .pre-commit-config.yaml
 create mode 100644 .readthedocs.yml
 create mode 100644 CHANGELOG.md
 create mode 100644 CONTRIBUTING.md
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100644 commitlint.config.js
 create mode 100644 docs/Makefile
 create mode 100644 docs/make.bat
 create mode 100644 docs/source/_static/.gitkeep
 create mode 100644 docs/source/changelog.md
 create mode 100644 docs/source/conf.py
 create mode 100644 docs/source/contributing.md
 create mode 100644 docs/source/index.md
 create mode 100644 docs/source/installation.md
 create mode 100644 docs/source/usage.md
 create mode 100644 poetry.lock
 create mode 100644 pyproject.toml
 create mode 100644 renovate.json
 create mode 100644 setup.py
 create mode 100644 src/biqueue/__init__.py
 create mode 100644 src/biqueue/main.py
 create mode 100644 src/biqueue/py.typed
 create mode 100644 tests/__init__.py
 create mode 100644 tests/test_main.py
✓ Created repository MaKaNu/biqueue on GitHub
✓ Added remote git@github.com:MaKaNu/biqueue.git
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
E:\Git\cmd\git.exe: exit status 128
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Temp\tmpq0xk341d.py", line 116, in <module>
    main()
  File "C:\Users\Admin\AppData\Local\Temp\tmpq0xk341d.py", line 106, in main
    setup_github()
  File "C:\Users\Admin\AppData\Local\Temp\tmpq0xk341d.py", line 39, in setup_github
    run_cmd(
  File "C:\Users\Admin\AppData\Local\Temp\tmpq0xk341d.py", line 5, in run_cmd
    return subprocess.run(args, check=True, **kwargs)
  File "F:\Programme\Python3_9\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gh', 'repo', 'create', 'MaKaNu/biqueue', '-d', 'BiQueue is a opencv based bidirectional threaded videostream.', '--public', '--disable-wiki=true', '--remote=origin', '--source=.', '--push']' returned non-zero exit status 1.
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
@MaKaNu MaKaNu added the bug Something isn't working label Jan 23, 2022
@browniebroke
Copy link
Owner

That's odd. What happens if you run the command manually:

gh repo create MaKaNu/biqueue -d "BiQueue is a opencv based bidirectional threaded videostream." --public --disable-wiki=true --remote=origin --source=. --push

You should run it from a local git repo and make sure that the repo name (right after create) doesn't exist yet.

@MaKaNu
Copy link
Author

MaKaNu commented Jan 27, 2022

I created a new local repo TEST_TEMPLATE initialized it, created empty README.md, staged/commited it and called the command: gh repo create MaKaNu/TEST_TEMPLATE -d "TEST_TEMPLATE IS A TEST REPO" --public --disable-wiki=true --remote=origin --source=. --push

And got the following result:

✓ Created repository MaKaNu/TEST_TEMPLATE on GitHub
✓ Added remote git@github.com:MaKaNu/TEST_TEMPLATE.git
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
E:\Git\cmd\git.exe: exit status 128

The weird thing is: The Repo was created but the commit not pushed. I had in the past multiple times issue with git on windows in cobination with OpenSSH Keys. I generally use Gitkraken for handling my configs, but with git on console it is always a hassle.

@browniebroke
Copy link
Owner

browniebroke commented Jan 28, 2022

Ok, seems like an issue with the GitHub CLI. This issues seem relevant:

Hopefully, they might also help you resolve the other issues you had with git on the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants