np icon indicating copy to clipboard operation
np copied to clipboard

Git Permission Denied

Open ProfessorManhattan opened this issue 5 years ago • 4 comments

Process fails at "Check git remote". I just initialized a new git repository using git init and git remote add origin GITLAB_URL and then pushed the files to master. My SSH key has a password on it. Could that be the issue? Also, I'm using Windows CMD with Git Bash executables installed - maybe that could be the issue?

Description

Publish a new version of @professormegabyte/professor (current: 0.0.1)

Commits:
- Initialized base Stencil component and added comments about the lifecycle hooks.  a12acc9

Commit Range:
f5eb6049dfe340b851d6d8a5263dc75a1adabe79...master

? Select semver increment or specify new version patch  0.0.2

  > Prerequisite check
    √ Ping npm registry
    √ Check npm version
    √ Verify user is authenticated
    √ Check git version
    × Check git remote
      → and the repository exists.
      Validate version
      Check for pre-release version
      Check git tag existence
    Git
    Cleanup
    Installing dependencies using npm
    Running tests using npm
    Bumping version using npm
    Publishing package using npm
    Pushing tags

✖ [email protected]: Permission denied (publickey).
Git fatal error: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Aborted!

C:\Users\x\OneDrive\Documents\Websites\x\professor>git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   package.json

no changes added to commit (use "git add" and/or "git commit -a")

Steps to reproduce

I'm not sure. I'm surprised this hasn't already been reported.

Expected behavior

Should not fail, should ask me to enter by SSH key password.

Environment

C:\Users\x\OneDrive\Documents\Websites\x\professor>np --version 5.2.1

C:\Users\blzal\OneDrive\Documents\x\professor>node -v v10.16.0

C:\Users\blzal\OneDrive\Documents\Websites\x\professor>npm -v 6.9.0

Windows 10

ProfessorManhattan avatar Jan 19 '20 07:01 ProfessorManhattan

I'm having the same issue. Anyone?

λ np

Publish a new version of postcss-cull-units (current: 1.0.0)

Commits:
- Version bump  d14fc77
- Removed .idea folder  6e7e9c6
- Appeased the ESLint 2: Electric Boogaloo  8ce5709
- Appeased the ESLint  b6a5184
- Fixed some Jest errors, removed NPX as well because it's a buggy mess  e4671bc

Commit Range:
161472c360344acef80c76d355af0078945930b1...master

Registry:
https://npm.pkg.github.com/

? Select semver increment or specify new version patch  1.0.1

  > Prerequisite check
    ↓ Ping npm registry [skipped]
    √ Check npm version
    √ Verify user is authenticated
    √ Check git version
    × Check git remote
      → and the repository exists.
      Validate version
      Check for pre-release version
      Check git tag existence
    Git
    Cleanup
    Installing dependencies using npm
    Running tests using npm
    Bumping version using npm
    Publishing package using npm
    Pushing tags
    Creating release draft on GitHub

× [email protected]: Permission denied (publickey).
Git fatal error: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Aborted!

Atulin avatar Feb 12 '20 19:02 Atulin

@ProfessorManhattan @Atulin The permission denied error can result from a wrong configured ssh connection. Can you connect with the command ssh -vT [email protected] or ssh -vT [email protected] to GitLab or GitHub (see troubleshooting guide)?

np gobbles up the password prompts. This is the reason, why you don't see it. I created PR #448 to fix another password prompt. If this PR is merged, i can create another PR to show the password prompts for connecting with ssh.

bunysae avatar Feb 17 '20 18:02 bunysae

Same issue. Environment:

  • Windows 10
  • Windows PowerShell 5.1.18362.752
  • NP 6.2.3
  • Node 12.16.1

But running the commands:

start-ssh-agent np ..

No problem

TiagoDanin avatar May 24 '20 16:05 TiagoDanin

I have same issue. Anyone can explain in detail?

komalpatel3112 avatar Jan 04 '21 10:01 komalpatel3112

This issue is unrelated to np. Ensure you have access to the remote repo and that your keys are correctly and globally set up

fregante avatar Feb 03 '23 10:02 fregante