dev-blog

Krótko: to nie Ubuntu się różni, tylko sposób uwierzytelniania Gita w różnych terminalach 🙂

Co się dzieje?

W terminalu w VS Code:

W zwykłym terminalu (np. GNOME Terminal):


Najczęstsze scenariusze

1️⃣ VS Code używa tokenu, a systemowy git – nie

VS Code zapisuje token w:

Zwykły terminal:


2️⃣ Inny Git / inna konfiguracja

Sprawdź:

which git
git --version

VS Code i system mogą używać innych binarek gita.


Jak to naprawić (polecane rozwiązania)

✅ OPCJA 1: Użyj SSH (najlepsze)

  1. Sprawdź remote:
git remote -v

Jeśli masz https://github.com/... → Git będzie pytał o hasło.

  1. Wygeneruj klucz SSH:
ssh-keygen -t ed25519
  1. Dodaj klucz do GitHuba
  2. Zmień remote:
git remote set-url origin git@github.com:user/repo.git

➡️ Od tej pory żaden terminal nie będzie pytał o hasło


✅ OPCJA 2: Włącz credential helper w Ubuntu

git config --global credential.helper store

lub lepiej:

git config --global credential.helper libsecret

Potem raz podasz token i Git go zapamięta.


✅ OPCJA 3: Sprawdź config Gita

git config --global -l
git config -l

TL;DR

Jeśli chcesz, mogę Ci pomóc:

Daj znać 👍