question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with Github Desktop on Windows

See original GitHub issue

Troubleshoot

If you’re migrating from husky 4, see: https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7

Context Please describe your issue and provide some context:

I’ve this pre-commit hook:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test

It works with git command line and Tortoise Git on Windows as expected, but on Github Desktop 3.0.2 I’ve this error message when I commit:

An address incompatible with the requested protocol was used.

husky - pre-commit hook exited with code 1 (error)

A hook file like this works:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo hello

But anything with npm does not.

Please kindly check it out.

Thank you!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
ZhaoXiangXMLcommented, Jun 16, 2022

Steps to reproduce:

In an empty folder:

  1. git init
  2. Save this file as package.json
{
    "scripts": {
        "prepare": "husky install",
        "test": "echo hello"
    },
    "devDependencies":{
        "husky": "^8.0.1"
    }
}
  1. npm install
  2. npx husky add .husky/pre-commit "npm test"
  3. Open the folder in Github Desktop and try to commit it image
1reaction
DoctorDerekcommented, Sep 7, 2022

Adding “C:\Program Files\Git\bin” to my PATH environment variable fixed this error at one point, as I described on Stackoverflow. Maybe try that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Desktop won't open on Windows 10 · Issue #3757
This is my solution after trying many suggested above. Go to 'C:\Users\YOUR USER NAMEn\AppData\Local\GitHubDesktop', and then delete the most ...
Read more >
windows 11 - Github desktop does not start any more
Then, find the install file for version 2.9.5 from the web. Installing that version worked for me. I hope it works for you...
Read more >
GitHub Desktop – Not launching UI – Problem & Fix
Software: GitHub Desktop 2.4.3 | Windows 10 About 1 or 2 weeks ago GitHub Desktop stopped opening it's window when lunched. It would...
Read more >
How to Use GitHub Desktop? A Complete Tutorial - Simplilearn
Once you click the “authorize desktop” button, you will see a pop-up window, asking permission for github.com to open the “x-github-desktop-dev- ...
Read more >
GitHub Desktop Tutorial - Collaborate With GitHub From Your ...
There is also a Git Client wherein the developers can work on the ... GitHub Desktop for Windows can be downloaded and installed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found