This has been an issue for quite some time now and it really confuses me.
It all began with my university using a different vpn client. I need to be connected to vpn to access the git server of our lab and we need to use ssh (not sure why http won´t work but thats what I´ve been told when I started working on that project). Everything worked fine except for pushing. I could clone, pull, fetch but nor push. Back then I´ve been working with Ubuntu 16 so I blamed it on that.
Now I´m on Ubuntu 18 and I can only sporadically connect to Git. Just last week I was able to pull and push but now I get
fatal: Could not read from remote repository
or
Connection closed by 123.45.67.89 port xy
every time.
I´m using the same ssh-key as last week. I added the key with ssh-add and I tried restarting the ssh agent but nothing works. I reconnected to the vpn a few times but that won´t change a thing. I can access the git server with my browser though.
As far as I know I´m the only one facing such problems so it´s probably an issue on my side. I just don't get why the ssh key works every now and then even though I´m not doing anything different.
I´d be glad for every bit of advice as I´m not very versed with networks or git.
Ps: Another thing I´ve noticed: On Ubuntu 16 I´ve been able to add new ssh keys to my profile. Now I can see my ssh-keys and enter a new one but when I try to add it the website just loads and loads but nothing happens. This is very confusing for me because my account has the same permissions as it did before.