Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If a secret scanner blocks git push, first identify what rejected it and whether the flagged value is a real credential. Remove and rotate a real secret; use a narrow, authorized exception only for a confirmed false positive or other justified case. A bare pre-receive hook declined message is not enough to prove that secret scanning caused the rejection.

What the rejection does—and does not—tell you

A server-side hook or policy rejected the push. On GitLab, Secret Push Protection runs in a pre-receive hook and ordinarily blocks detected secrets, but other pre-receive or update hooks can reject pushes too. GitLab’s generic hook guidance explains that the phrase (pre-receive hook declined) may appear without naming the cause: GitLab server hooks.

Read the complete remote output before changing settings. GitLab says a secret-protection block can identify the commit, file and line, and secret type. Record those details, the repository, and the host. If the output only reports a declined hook, ask a maintainer to check configured hooks and server-side logs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the response that matches the cause

What you find What to do Who should act
A genuine token, key, password, or other credential Remove it from the commit being pushed and, where appropriate, from affected history. Revoke or rotate the exposed credential. Do not bypass the scan as a substitute. Contributor and credential owner; involve a maintainer if history changes are needed.
A confirmed false positive or test-only value Use the host’s documented exception process, give the required reason, and follow repository policy. A permitted contributor, or designated reviewer if approval is required.
A secret appears in a changed file but not in the new diff Check the GitLab version and scan behavior. Before GitLab 17.11, push protection could scan modified-file contents beyond the new diff. Maintainer or administrator can confirm version and configuration.
The message names only a declined hook or another policy Inspect the server-side hook or policy and its logs rather than assuming secret scanning is responsible. Project maintainer or server administrator.
The scanner reports an unexpected error or times out Investigate the operational issue and retain protection where possible. GitLab documents scan timeouts and unexpected scan errors among conditions where a secret may not be blocked. Maintainer or administrator.

GitLab: confirm version and use a documented exception only when justified

GitLab documents Secret Push Protection as a GitLab Ultimate feature on GitLab.com, Self-Managed, and Dedicated; it became generally available in GitLab 17.5. Its pre-receive check ordinarily blocks pushes that detect secrets. Details and current configuration guidance are in GitLab’s Secret Push Protection documentation.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Version can explain an unexpected match. Before GitLab 17.11, scanning could inspect modified-file contents rather than only the diff, so an existing secret in a changed file could be flagged even if the new lines did not introduce it. Conversely, detection is not a guarantee: the documentation lists scan timeouts and unexpected scan errors as cases where a secret may not be blocked.

For an approved one-push exception, GitLab documents git push -o secret_push_protection.skip_all. It also documents adding [skip secret push protection] to the commit message for clients that need that method. These skip mechanisms bypass the check; they do not remove or make a real credential safe. Confirm the finding and your team’s policy before using either.

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

GitHub: bypass permissions and review depend on configuration

GitHub’s workflow is permission- and configuration-dependent. When a contributor is allowed to bypass a block, the UI may ask for a reason. The handling differs by reason: the documentation describes alerts and notifications for real-secret cases, and different alert handling for false positives or test-only values. See GitHub’s push-protection UI guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If delegated bypass is enabled, a contributor without bypass privileges must request an exception from designated reviewers. Without delegated bypass, contributors may be able to bypass at their own discretion, subject to the configured controls. The process is described in GitHub’s bypass-request documentation. Follow the repository’s approval rules; a permitted bypass is not evidence that a detected credential is harmless.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why turning protection off globally is usually the wrong first move

A single blocked push does not establish that the scanner is misconfigured or that its protection should be disabled. First establish the rejecting control, validate the match, and check version or operational errors. Prefer the smallest justified action: correct the commit, record a false-positive exception, or have a maintainer investigate the hook.

GitLab’s production troubleshooting runbook treats service-wide disabling as an administrative response to significant performance degradation, and identifies project-level control as the preferred scope when a project disablement is warranted: GitLab Secret Push Protection troubleshooting runbook. It is an operations runbook, not a command guide for ordinary contributors. If a broader change appears necessary, involve the project maintainer or administrator rather than trying to disable an instance-wide control yourself.

Best Value
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified (Pack of 2)
  • The information below is per-pack only
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.