Intermittent connection to Azure-devops. Unable to push code to the repo - azure-devops

I use Azure repository for managing code and I have not been very lucky
with checking in code and pushing code. I would get one error or the other.
Here are some of the errors I get
fatal: unable to access 'https://dev.azure.com/mydevops/myStartup/_git/myStartup/':
OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:xxx
Failed to push the branch to the remote repository. See the Output window for more details.
Error encountered while pushing branch to the remote repository: Branch feature/445-create-unit-test does not exist.
Commit changes locally and then push.
I tried to check in a branch and it got checked in but when It was time to push, I was not able
to push. Here is what I got. I got a message to run the command below
git push --set-upstream origin feature/445-create-unit-test
Any ideas about what I am doing wrong?

I've seen this problem, in my case it was IPv6 issue.
Try this:
Open command line and do ping dev.azure.com - if the IP address is IPv6 (something like 2620:1ec:21::20), then it might be the problem.
configure Windows to prefer v4 over v6:
netsh int ipv6 set prefixpolicy ::ffff:0:0/96 51
Alternatively, you might disable IPv6 alltogether.

Related

LibreSSL SSL_connect: Broken pipe in connection to bitbucket.org:443

I used to pull and push bitbucket repos using GitHub desktop earlier, but for the last couple of days, I started getting this error and I'm unbale to push or pull my changes.
fatal: unable to access 'https://bitbucket.org/<<<Repo Link>>>/': LibreSSL SSL_connect: Broken pipe in connection to bitbucket.org:443
This issue seems only when I use github desktop, I can log in to my bitbucket repo in the browser and see all the files without any issues.
git config http.sslverify false
solved the problem.

Failed to connect to github.com port 443: Time out

When try to clone a project using the git clone command I got this following error message.
Failed to connect to github.com port 443: Time out
DDoS attack check this link https://status.github.com/
The connectivity problems have been identified as a DDoS attack. We're working to mitigate now.
Make sure that you have used
$ git remote add origin git#github.com:**yourname**/learngit.git
to connect your local repository to github.
If you find the following error:
fatal: remote origin already exists.
Then write the following statement in your git bash.
$ git remote rm origin
then write again to re-connect your repository to GitHub.
$ git remote add origin git#github.com:**yourname**/learngit.git
If the above steps can not help you, there must be some ssh errors I think.

Git hub pushing to a forked repo

I'm new to github and I couldn't seem to find a solution to my problem, so bear with me a little.
I'm trying to push changes that I've made to a forked repo via command line on an ec2 ubuntu instance from aws. After making changes to my file, I committed the file I changed and then pushed it over to git:
ubuntu#ip-172-31-33-24:~/bitstarter$ git push origin master
Username for 'https://www.github.com': edasaur
Password for 'https://edasaur#www.github.com':
fatal: Authentication failed
I'm hypothesizing that this might be an issue with the fact that I'm pushing over to a forked repo because when I attempted to commit and push changes over to a repository that I started, it seemed to work. However, I'm at a loss at what to do. When I tested whether my SSH key worked via the command:
ubuntu#ip-172-31-33-24:~/bitstarter$ ssh -T git#github.com
Hi edasaur! You've successfully authenticated, but GitHub does not provide shell access.
Thanks in advance!
First, you are pushing using an https address, so any ssh settings you might have won't have any bearing on the completion of the (https) push.
Second, the right https url you should use is:
https://edasaur#github.com/edasaur/bitstarter.git
(no need for www.github.com)
(I like to put the username in the url: that is one less data to enter when pushing)
That means you can set your url with:
git remote set-url origin https://edasaur#github.com/edasaur/bitstarter.git
Third, double-check your password (and see if there is any special character in it like an '#', which might not be directly supported over an http query)
If nothing works, you can still fallback on ssh url:
git remote set-url origin git#github.com:edasaur/bitstarter.git

GitHub -> 'The remote end hung up unexpectedly'

I am trying to push a project (Calico) to GitHub, and am running into an error. I've successfully logged in via a ssh connection, and received the usual response:
Ryan#RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ ssh git#github.com
Enter passphrase for key '/c/Users/Ryan/.ssh/id_rsa':
Hi rossryan! You've successfully authenticated, but GitHub does not provide shel
l access.
Connection to github.com closed.
However, I am still receiving an error when I attempt to push the code:
Ryan#RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git push -u github master
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned.
fatal: The remote end hung up unexpectedly
I believe I've followed the instructions rather faithfully from the website, substituting 'GitHub' for 'origin' in the right areas (origin is apparently already defined, so I used a different name). I've emailed GitHub about this problem, but have received no response.
Does anyone have any other ideas?
EDIT:
Output from git remote -v:
Ryan#RYANLAPTOP-PC /C/inetpub/wwwroot/Calico (master)
$ git remote -v
github git#github.com:rossryan/Calico.git (fetch)
github git#github.com:rossryan/Calico.git (push)
origin C:/inetpub/wwwroot/Calico/ (fetch)
origin C:/inetpub/wwwroot/Calico/ (push)
git push origin master fails was about that error when using putty (instead of the packaged openssh included with msysgit). I don't think that is your case.
git - Server host key not cached is about that same error, and proposes to establish an ssh connection, which you did (and it didn't propose to add github to your $HOME/ssh/known_hosts file, so this isn't the issue either.
What you need to check is:
why are you pushing to github instead of the default name 'origin' (did you really add a remote (upstream) repo named 'github'?)
What exact address is behind the remote name 'github'. A right address for pushing would be (from GitHub man page on remote):
an ssh URL git#github.com:user/repo.git
or an https URL such like https://user#github.com/user/repo.git

I can't add file or change file to github.com

I've created an account for github,and set up ssh at home and at my workplace. now I just want to renew and add files so that I do some operation like this:
jty#CVICSE-0E662498 ~/front-end-learn (master)
$ git remote add origin git#github.com:jtyjty99999/front-end-learn.git
jty#CVICSE-0E662498 ~/front-end-learn (master)
$ git push - u origin master
ssh:github.com:noaddress associated with name
fatal: The remote end hung up unexpectedly
I failed T_T. At my workplace I used proxy to connect to Internet, does it matter? How can I solve this problem? thanks everyone cordially.
I think you are inputting the command wrong, I believe it is supposed to be this
git push -u origin master
(no space after the '-')
and you can double check the proper address by using
git remote -v
edit: you also have to use the commands commit and add to actually tell git what to push
here is more info