I have been working with a repository on a remote Ubuntu server for the last one week and I was able to pull and push changes to company repository with no problem until one day ago. I am using it with a personal access token.
I created a new personal access token and changed it, but it still does not work. I deleted Git and Git credentials and set them again, but it still does not work. And additionally I tried to set my GitHub password and I am still unable to progress. I cannot even clone any repository from company repositories on anywhere on the remote server. I am able to clone, pull, and push on my personal computer.
My ~/.gitconfig
setting on remote is like this right now:
[user]
name = ****
email = ****
token = ghp_****
password = *****
Additionally, when I do both the following lines,
git clone https://[email protected]/company/repo.git
git clone https://github.com/company/repo.git
I get the following line on remote, but it never says anything. I tried with --verbose
, but it still says nothing and get stuck in this forever until canceled. I tried these with only a password, token, etc. and waited like up to 10 minutes a couple of times in each without any progress.
Cloning into 'repo'...
and when I try the same command in my computer, it asks for a password and proceeds without any problem.
I tried to delete Git and resetting all global configurations. I deleted added new remote, changed repository configurations, etc., but it is still not working. And it does not even give any log. But it works for public repositories. My account is for private (not company private) repositories. I have no idea why this does not work. I am unable to push changes I made or pull others' changes.
I am using Visual Studio Code as well on remote. I tried to delete/restart/reinstall/reset all extensions, but no luck there either.
I am using Mac as PC and Ubuntu 20.04 (Focal Fossa) as the remote server.
CodePudding user response:
The issue fixed itself. After the weekend, when I came back to work and tried to Git sync and it asked for both a username and password (Git token in my case), the issue no longer existed.
But I have no idea why issue existed in the first place.