1

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://username@github.com/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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Yusuf gndz
  • 137
  • 10
  • @phd this didn't work. But suddenly this fixed itself like nothing happened when I came after weekend holiday. Ant now it does not accept git config but I need to rewrite username and password(git token) everytime and that is okay. – Yusuf gndz Nov 16 '21 at 18:20
  • This could be confirmation bias, but are you sure it isn't related to the recent Visual Studio Code upgrade to 1.62.2 (or maybe even 1.62.1 by some reports) that broke the "connection" to GitHub from Visual Studio Code? A candidate for the canonical question is *[fatal: Authentication failed for](https://stackoverflow.com/questions/69979522/)* (despite the unspecific title). – Peter Mortensen Nov 17 '21 at 22:20
  • 1
    As I said in my post I wasn't able to get any logs like that in fact my version just got stuck on both terminal and vscode extension. Issue might be from that link but I did not get any log but It was just waiting there. That might be the problem but I cannot know without logs unfortunately. – Yusuf gndz Nov 18 '21 at 18:40

1 Answers1

1

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Yusuf gndz
  • 137
  • 10