Linux fatal unable to access

How to resolve «fatal: unable to access » error

6 Answers 6

You mentioned you are trying to pull from git but the command is git push. Anyways, most probably you are getting this error because your repo url is not set locally.

  1. If this is the first time you are sending git request from your system, you might want to setup your username by git config —global user.name «John Doe»
  2. If you have already used git on your system, try checking the git configuration on your system using git config —list command to check whether your repo URL is setup or not.
  3. If the url is not setup run git remote set-url origin https://github.com/www-prolificme-com/mahawiki/
  4. Run git remote -v to verify if your url is setup
  5. git add .
  6. git commit -m «your message»
  7. git push origin master

Can you please mention the steps you are following along with the output of git config —list command?

first i cloned the repository, then i executed ‘git config —list ‘ then i saw website link,hence i executed git remote -v ,then git add. then ‘git commit -v’ and finally executed git push command. but i received the same error

Why are you using git commit -v ? Try git commit -m «your comment» and git push origin branch_name , you can check branch name with git branch . Also, git remote -v does not executes anything, it only returns the current repository you are in.

still receiving the error,i have included the screenshot of the console.can you check the updated of my question..

Remove/Update the saved credentials:

  1. Click Start
  2. Search for ‘Credential Manager’
  3. Select ‘Windows Credentials Manager’ > ‘Windows Credentials’
  4. Search for the credentials that you want to remove/update
  5. Click on the credential entry > Click ‘Edit’ or ‘Remove’

your repo is not setting locally so, you seemed crash message

to showing your git repo set list and

to access git repo and git add . to add your files to git container

git commit -m "your git commit message" 

this is your git commit message version or anything possible

finally your files pushing on git repo it’s done! try it

intersting. first your git local repo to backup another folder and your git folder to delete 1. ‘add a new folder’ 2. that folder is git folder ‘git init’ to make git local repo 3. ‘git clone github.com/www-prolificme-com/mahawiki’ to cloning your folder 4. backup folder to original git folder 5. git add . 6. git commit -m «message» 7. git push

Читайте также:  Звук при включении linux

i think may your permission denied error is github ssh key register error, make one of ssh and add on github account

I got this same problem then I try to this below command.

git config --global user.email "user email" 
git config --global user.name "user name" 

After running those commands, you can use this command to push your code:

Even if you set all credentials and other setups in the local machine, you might face this problem.

Currently, GitHub uses ‘personal access token’ so when or after creating personal access token you must check the Select scopes .

enter image description here

You select all you need and then push again. It will be pushed successfully.

Источник

Чтобы не забыть!

Это происходит из-за того, что на машине, где выполняется команда, отсутствует доверие к корневому центру сертификации, выдавшему SSL-сертификат, используемый сервером.
Решить это можно 2 путями.

Первый — временно игнорировать нарушение целостности цепочки сертификации.
Второй — установка необходимого корневого сертификата.

Чтобы временно отключить проверку целостности цепочки сертификации можно использовть параметр http.sslVerify=false.
Сделать это можно непосредственно при выполнении команды

git -c http.sslVerify=false clone . 
# Для конкретного репозитория # (команду нужно выполнять в каталоге репозитория) git config http.sslVerify "false" # Для любого репозитория git config --global http.sslVerify "false" 

Для решения проблемы раз и навсегда убедимся, что пакет ca-cetrificates установлен и имеет актуальную версию

# Ubuntu/Debian apt install ca-certificates # CentOS yum install ca-certificates
# Ubuntu/Debian sudo cp ca-cert.crt /usr/local/share/ca-certificates/ # CentOS sudo cp ca-cert.crt /etc/pki/ca-trust/source/anchors/
# Ubuntu/Debian sudo update-ca-certificates # CentOS sudo update-ca-trust extract

Источник

Unable to acess — Push Git

I am facing the following error when executing a push in git: Fatal: unable to access ‘https://github.com/usergit/project.git’: failed to connect to 10.216.x.xxx port 8080: Time out I already ran the unset proxy in git and also disabled the proxy in windows.

So, try to find out why it is failing? Any firewall in between? If you are on Windows run ‘tracert ‘. It tells you where it’s getting failed!

2 Answers 2

HTTPS cloning errors There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don’t have access to the repository.

Here’s an example of an HTTPS error you might receive:

error: The requested URL returned error: 401 while accessing https://github.com/user/repo.git/info/refs?service=git-receive-pack fatal: HTTP request failed Error: The requested URL returned error: 403 while accessing https://github.com/user/repo.git/info/refs fatal: HTTP request failed Error: https://github.com/user/repo.git/info/refs not found: did you run git update-server-info on the server? 

Check your Git version

There’s no minimum Git version necessary to interact with GitHub, but we’ve found version 1.7.10 to be a comfortable stable version that’s available on many platforms. You can always download the latest version on the Git website.

Ensure the remote is correct

The repository you’re trying to fetch must exist on GitHub, and the URL is case-sensitive.

Читайте также:  Making commands in linux

You can find the URL of the local repository by opening the command line and typing git remote -v:

git remote -v # View existing remotes origin https://github.com/github/reactivecocoa.git (fetch) origin https://github.com/github/reactivecocoa.git (push) git remote set-url origin https://github.com/github/ReactiveCocoa.git # Change the 'origin' remote's URL git remote -v # Verify new remote URL origin https://github.com/github/ReactiveCocoa.git (fetch) origin https://github.com/github/ReactiveCocoa.git (push) 

Alternatively, you can change the URL through our GitHub Desktop application.

If you have enabled two-factor authentication, or if you are accessing an organization that uses SAML single sign-on, you must provide a personal access token instead of entering your password for HTTPS Git.

Check your permissions

When prompted for a username and password, make sure you use an account that has access to the repository.

Tip: If you don’t want to enter your username and password every time you interact with the remote repository, you can turn on password caching.

Use SSH instead

If you’ve previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see «Which remote URL should I use?»

Источник

Linux Git: Unable to access remote: error setting certificate verify locations

So I’m running OpenSUSE Leap 42.1, and Git 2.6.6. Up until today, I’ve had no problems pushing/pulling/fetching from a remote GitHub repo. Now, today, I’m having this error message:

fatal: unable to access 'https://github.com/myName/myProject.git/': error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none 

Anytime I do a push/pull/fetch, I get this. My first thought was to check that filepath that’s provided, and no file named ca-certificates.crt exists in /etc/ssl/certs. So. I’m not entirely sure what to do. Not sure why this suddenly stopped working either, maybe an OS or git update broke it? Either way, looking to be pointed in the right direction. Thanks.

It seems to be a problem about github and its self signed certificate. Try to search about that on internet or SO

3 Answers 3

Apparently, sometimes the cert files change so you need to keep a bundle of several , rather that just one! Moreover, I will recommend to try and maintain the secure connection rather that turning it off with:

git config --system http.sslVerify false 
git config --global http.sslVerify false 

That is a very bad practice and should be avoided at all causes.

So first, look up that bundle cert file. In Windows, it is located under the git installation dir, something like:

In Linux, you can try something like this (I haven’t try this though):

$ curl-config --ca **/etc/ssl/certs/ca-certificates.crt** 

or maybe this other location:

**/etc/ca-certificates/extracted/ca-bundle.trust.crt** 

Regardless where it maybe or the OS you are using once you get that bundle certification file, you then need to tell git to configure using that cert. You can modify the git.config file several why but one straight way is:

git config --system http.sslcainfo /bin/curl-ca-bundle.crt 

I hope it helps. For more information there is this other discussion. Please let me know if it helps.

Читайте также:  Arch linux java install

check there may be a ssl file in somewhere else. I have the same problem in windows 10 installation and i solved it by making a usr directory and copy the content of ssl directory into usr directory.

Regardless where it maybe or the OS you are using once you get that bundle certification file, you then need to tell git to configure using that cert. You can modify the git.config file several why but one straight way is:

git config --system http.sslcainfo /bin/curl-ca-bundle.crt 

With Git 2.34 (Q4 2021), that would be:

git config --system http.sslcainfo %(prefix)/bin/curl-ca-bundle.crt 

The pathname expansion (like » ~username/ «) learned a way to specify a location relative to Git installation (e.g. its $sharedir which is $(prefix)/share ), with » %(prefix) «.

interpolate_path() : allow specifying paths relative to the runtime prefix

Signed-off-by: Johannes Schindelin

Ever since Git learned to detect its install location at runtime, there was the slightly awkward problem that it was impossible to specify paths relative to said location.

For example, if a version of Git was shipped with custom SSL certificates to use, there was no portable way to specify http.sslCAInfo .

In Git for Windows, the problem was «solved» for years by interpreting paths starting with a slash as relative to the runtime prefix.

However, this is not correct: such paths are legal on Windows, and they are interpreted as absolute paths in the same drive as the current directory.

After a lengthy discussion, and an even lengthier time to mull over the problem and its best solution, and then more discussions, we eventually decided to introduce support for the magic sequence %(prefix)/ .

If a path starts with this, the remainder is interpreted as relative to the detected (runtime) prefix.
If built without runtime prefix support, Git will simply interpolate the compiled-in prefix.

If a user wants to specify a path starting with the magic sequence, they can prefix the magic sequence with ./ and voilà, the path won’t be expanded.

config now includes in its man page:

If a path starts with %(prefix)/ , the remainder is interpreted as a path relative to Git’s «runtime prefix», i.e. relative to the location where Git itself was installed.

For example, %(prefix)/bin/ refers to the directory in which the Git executable itself lives.

If Git was compiled without runtime prefix support, the compiled-in prefix will be substituted instead.

In the unlikely event that a literal path needs to be specified that should not be expanded, it needs to be prefixed by ./ , like so: ./%(prefix)/bin .

Источник

Оцените статью
Adblock
detector