Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8283911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:54:37+00:00 2026-06-08T10:54:37+00:00

Using Git, is there a way to tell it to accept a self signed

  • 0

Using Git, is there a way to tell it to accept a self signed certificate?

I am using an https server to host a git server but for now the certificate is self signed.

When I try to create the repo there for the first time:

git push origin master -f

I get the error:

error: Cannot access URL     
https://the server/git.aspx/PocketReferences/, return code 22

fatal: git-http-push failed
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:54:39+00:00Added an answer on June 8, 2026 at 10:54 am

    To permanently accept a specific certificate

    Try http.sslCAPath or http.sslCAInfo. Adam Spiers’s answer gives some great examples. This is the most secure solution to the question.

    To disable TLS/SSL verification for a single git command

    try passing -c to git with the proper config variable, or use Flow’s answer:

    git -c http.sslVerify=false clone https://example.com/path/to/git
    

    To disable SSL verification for all repositories

    It is possible to globally deactivate ssl verification. It is highly recommended to NOT do this but it is mentioned for completeness:

    git config --global http.sslVerify false # Do NOT do this!
    

    There are quite a few SSL configuration options in git. From the man page of git config:

    http.sslVerify
        Whether to verify the SSL certificate when fetching or pushing over HTTPS.
        Can be overridden by the GIT_SSL_NO_VERIFY environment variable.
    
    http.sslCAInfo
        File containing the certificates to verify the peer with when fetching or pushing
        over HTTPS. Can be overridden by the GIT_SSL_CAINFO environment variable.
    
    http.sslCAPath
        Path containing files with the CA certificates to verify the peer with when
        fetching or pushing over HTTPS.
        Can be overridden by the GIT_SSL_CAPATH environment variable.
    

    A few other useful SSL configuration options:

    http.sslCert
        File containing the SSL certificate when fetching or pushing over HTTPS.
        Can be overridden by the GIT_SSL_CERT environment variable.
    
    http.sslKey
        File containing the SSL private key when fetching or pushing over HTTPS.
        Can be overridden by the GIT_SSL_KEY environment variable.
    
    http.sslCertPasswordProtected
        Enable git's password prompt for the SSL certificate. Otherwise OpenSSL will
        prompt the user, possibly many times, if the certificate or private key is encrypted.
        Can be overridden by the GIT_SSL_CERT_PASSWORD_PROTECTED environment variable.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Instead of selecting files manually when using git add , is there a way
Is there a Python way without using a subprocess to clone a git repository?
Is there any way to remove a file using git gui then commit and
If you're using Git from the command line, is there a way to delete
Is there a way to tell git to ignore a file that's stored in
I'm trying to get started using Git and TortoiseGit. Is there a way to
Is there a way to interface a git repository using svn's command set? Context
When using git, is there a way to show commits made to a branch,
Is there a way to exclude certain paths/directories/files when searching a git repository using
When using git submodules, what is the preferred way of doing customizations? Should I...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.