git clone fatal error - repository 'https' does not exist - python-3.x

I am trying to get a git clone of a github repo, namely odoo (formerly OpenERP). When trying to run the git clone command in Centos 8, I get the following error:
error as shown in terminal
I am running this command in root. I have tried running it as sudo.
The machine is running in a VPS, and seems to have https resolving issues. I can't ping google through https for instance. I also checked, and there is no firewall causing issues. https ping attempt
How do I best approach this? I'm not sure if it is a name server issue or the like.

Try git clone https://github.com/odoo/odoo.git --depth 1 -b 13.0
Ping requires only hostname, not a URL. Try pinging ping google.com

Related

ssh: Could not resolve hostname github.com: Temporary failure in name resolution

The repo was cloned using SSH at the start. I had no issues pushing to Github until today. I've been trying to solve this error for a whole day but i still cannot solve this error.. It would be great if anyone can shed some light on this! Thank you :)
2dsnakegame git:(main) git push origin main
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
➜ 2dsnakegame git:(main) git remote
origin
➜ 2dsnakegame git:(main) git remote --v
origin git#github.com:xxxx/2dsnakegame.git (fetch)
origin git#github.com:xxxx/2dsnakegame.git (push)
I had the same situation working on Windows with WSL2. It looks like there was a trouble on the connection to the DNS server, so I basically reset my TCP/IP with the following commands and then git pull/git push worked again.
From University of Wisconsin: Windows 10 TCP/IP Reset: Open the cmd prompt on Windows as an administrator and run the following commands in this order in order to fix your connection problem:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Finally, restart your computer.

gnutls_handshake() failed: Handshake failed GIT

Everything was working fine but suddenly I am getting the error:
fatal: unable to access
'https://username#bitbucket.org/name/repo_name.git/':
gnutls_handshake() failed: Handshake failed
I am getting this on my computer as well as an EC2 instance. When I tried on another computer then it is working fine there.
I have tried many solutions from Stackoverflow and from other forums. but nothing worked!
On the computer, os is Linux mint 17 and on EC2 instance, Ubuntu 14.04.6 LTS.
What can be the issue and what should I do to fix this issue?
Ran into the same issue on a server with Ubuntu 14.04, and found that on Aug 24, 2020 bitbucket.org changed to no longer allow old ciphers, see https://bitbucket.org/blog/update-to-supported-cipher-suites-in-bitbucket-cloud
This affects https:// connections to bitbucket, but does not affect ssh connections, so the quickest solution for me was to add an ssh key to bitbucket, and then change the remote from https to ssh.
The steps to change the remote I found from here, and they are essentially:
# Find the current remote
git remote -v
origin https://user#bitbucket.org/reponame.git (fetch)
origin https://user#bitbucket.org/reponame.git (push)
# Change the remote to ssh
git remote set-url origin git#bitbucket.org:reponame.git
# Check the remote again to make sure it changed
git remote -v
There is more discussion about the issue on the Atlassian forums at https://community.atlassian.com/t5/Bitbucket-questions/fatal-unable-to-access-https-bitbucket-org-gnutls-handshake/qaq-p/1468075
The quickest solution is to use SSH instead of HTTPS. I tried other ways to fix the issue but it was not working.
The following are steps to replace HTTPS from SSH:
Generate ssh key using ssh-keygen on the server.
Copy the public key from the generated id_rsa.pub file from step 1 and add it at following links depending on the repository host -
Bitbucket - https://bitbucket.org/account/settings/ssh-keys/
Github - https://github.com/settings/ssh/new
Gitlab - https://gitlab.com/profile/keys
Now run the following command to test authentication from the server command line terminal
Bitbucket
ssh -T git#bitbucket.org
Github
ssh -T git#github.com
Gitlab
ssh -T git#gitlab.com
Go to the repo directory and open .git/config file using emac or vi or nano
Replace remote "origin" URL (which starts with https) with the following -
For Bitbucket - git#bitbucket.org:<username>/<repo>.git
For Github - git#github.com:<username>/<repo>.git
For Gitlab - git#gitlab.com:<username>/<repo>.git
sudo bash
mkdir upgrade
cd upgrade
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
tar xpvfz openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
./Configure
make ; make install
cd ..
wget https://curl.haxx.se/download/curl-7.72.0.tar.gz
tar xpvfz curl-7.72.0.tar.gz
cd curl.7.72.0
./configure --with-ssl=/usr/local/ssl
make ; make install
cd ..
git clone https://github.com/git/git
cd git
vi Makefile, change prefix= line to /usr instead of home
make ; make install

Jenkins Error 128 / Git Error 403: Jenkins can't connect to my Bitbucket repository

OS: Ubuntu 16.04
Hypervisor: VirtualBox
Network configuration: Nat Network with port forwarding to access the vms through the host ip. I can also ping a VM from another VM.
I try to connect my Jenkins app hosted on a VM to my BitBucket server also on a VM. I followed a tutorial on internet but when i enter the address of my git repository i'm getting this:
Failed to connect to repository : Command "usr/bin/git ls-remote -h http://admin#192.168.6.102:8005/scm/tes/repository-test.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'http://admin#192.168.6.102:8005/scm/tes/repository-test.git/': The requested URL returned error: 403
So, to be sure I tried to exectute the command on the terminal... and on the terminal it seems to work.. I can also push, clone, pull etc..
On this image you can see that it's true
Do you have an explanation?
EDIT:
I try some others things like use or not sudo to see if the permissions problem came from that and it seems that it's not the case.
But I see that there is no result when we use the "HEAD" argument.
Do you think that because "HEAD" give no result, git in jenkins interprets it like no answer and returns the damn** error 403?
EDIT 2:
I found that on the web: http: // jenkins-ci.361315.n4.nabble.com/Jenkins-GIT-ls-remote-error-td4646903.html
The guy has the same problem but in a different way, I will try to allocate more RAM to see if it does the trick.
There could be many possible problems, but you are getting 403 - Access Forbidden, which indicates some problem with permissions. I would suggest first common mistakes:
a) trying https instead http - my scm only uses https,
b) check if admin is correct - scm by default uses scmadmin.
Here I run the exact same command twice.
The first time I used the proxy configuration wich I need to access internet, and the second time I set the mandatory server on "none".
So there is a problem with the damn proxy.
I was thinking that the proxy was not used in NAT connection with VirtualBox...
I found the solution.
I had to reinstall jenkins to have a user named "jenkins" with his own home directory.
I don't know if it is linked or not, but I configured my bitbucket server to use only HTTPS with a self signed certificate (I work in lan)
My troubleshoot was linked with my proxy settings.
I disabled all my proxy settings in Linux so I was able to launch the command that did'nt worked in jenkins with terminal.
I logged with sudo su jenkins the commands also worked.
I found out that in the home directory of the jenkins user there was a "proxy.xml" file. I opened it and saw my old proxy settings.
I deleted all the content with vim, saved and restarted and the error was gone.
there can be git version miss match.....
I would suggest you update git once. maybe it will resolve your issues.

Can anyone access pluggable-transports/meek.git?

git clone https://git.torproject.org/pluggable-transports/meek.git
fatal: unable to access 'https://git.torproject.org/pluggable-transports/meek.git/': Failed to connect to gitweb.torproject.org port 443: Connection timed out
and I get TorBrowser running ,and config git with
git config --global http.proxy 'socks5://127.0.0.1:9150'
git config --global https.proxy 'socks5://127.0.0.1:9150'
and git clone get these message:
fatal: unable to access 'https://git.torproject.org/pluggable-transports/meek.git/': Can't complete SOCKS5 connection to 0.0.0.0:0. (1)
Does meek source code accessible?
I want use tor not JUST TorBrowser Bundle . and I need meek to get out the GFW .
curl https://torproject.org --socks5 '127.0.0.1:9150'
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (6)
TorBrowser 6.0.6 is running
ScreenShot
The apparent problem is that Git's HTTP(S) proxy doesn't do DNS resolution over SOCKS and relies on your system DNS server. So when you try to clone (via https://gitweb.torproject or the .onion site) it's doing a DNS lookup through your default DNS servers which I think are giving you bad information.
This should work (because it resolves DNS over Tor):
curl https://torproject.org --socks5-hostname '127.0.0.1:9150'
While this probably doesn't (because it uses your default DNS servers):
curl https://torproject.org --socks5 '127.0.0.1:9150'
That said, I didn't try very hard or look more into having Git's proxy resolve DNS over SOCKS, but the easier thing to do is try using torsocks or proxychains.
Go to https://github.com/rofl0r/proxychains-ng - download, configure, build, and install. Then edit /etc/proxychains.conf and change socks4 127.0.0.1 9050 to socks5 127.0.0.1 9150
Then run:
./proxychains4 git clone http://dccbbv6cooddgcrq.onion/pluggabletransports/meek.git
If it works, you're set.
The directory permissions are fine. They show up funny in the web viewer d--------- but when you clone it, the directories will get permissions (probably 0755) based on your umask.
In any case, if you're still stuck, I've uploaded the meek git clone to https://drew.co.il/downloads/meek.zip so you can try to download that. It'll have the .git directory in it in case you need that later.
I checked meek source tree ,and find out it has d--------- permission . There is no 'w',nor 'x' and no 'r' ,but yet ,the directory can be accessed from browser ,and its file has 644 permission . Perhaps that's why i cann't clone it .
BTW,TBB's proxy works fine . and git's proxy configuration also right . If anyone else wants to know .

Facing errors in connecting openstack github repository?

Am new to linux and openstack.
I was trying to install openstack in local Linux environment -Redhat. When I was running the below command I was getting below error
[root#xyz123 apps]# git clone https://git.openstack.org/openstack-dev/devstack
Cloning into 'devstack'....
fatal: unable to access 'https://git.openstack.org. /openstack-dev/devstack': Failed to connect to 2001:4556:5666:334:be7. Network is unreachable
Tried the above URL with 'http.... But same error.
I also tried below URLs by googling.
git clone git://git.openstack.org/openstack-dev/devstack
Unable to connect to git.openstack.org:
git.openstack.org[0 : 100.138.234.128] : errNo =No route to host
git.openstack.org[1:2001.4334.6667.157.be67]: errNo=Network is unreachable
git clone https://github.com/openstack-dev/devstack.git
Unable to access 'https://github.com/openstack-dev/devstack.git/' : SSL received a record that exceeded the maximum permissible length
Note: git installed .version 1.8
I have no problems cloning that repo using either the "https:" or "git:" URLs.
Your problem could be / have been:
A temporary problem with the Openstack git servers.
A problem with the networking on the system where you are trying to run clone.
Your access could be blocked blocked by your organization's firewall.
Something like this: https://en.wikipedia.org/wiki/Censorship_of_GitHub

Resources