Score:0

git cant authentication

in flag

I'm a developer that has switched to ubuntu and I can't get git to work. I have logged in to git but I still get

> git push origin main:main
remote: No anonymous write access.
fatal: Authentication failed for 'https://github.com/zaze06/Tetris.git'

when I try to update the code on GitHub from what's on my PC I'm running

  • Ubuntu: 20.04
  • git: 2.25.1
  • visual studio code: 1.62.2
Pilot6 avatar
cn flag
This is a question about `git`. You need to setup git, so it has a login.
zaze avatar
in flag
then how because fro what I have found on searches doesn't work
Pilot6 avatar
cn flag
What "doesn't work"? Github has a perfect help.
zaze avatar
in flag
then I'm just bad at searching or something like that
zaze avatar
in flag
I found [this](https://techglimpse.com/git-push-github-token-based-passwordless/) but it didn't work so do you know of a guide or what it's called?
zaze avatar
in flag
ok it kinda worked it worked in the way of I can push a commit to GitHub but vscode cant do it by itself
ph flag
You either need to use anonymous http to access a git repository, in read only mode, or password authenticated https, or an ssh key exchange. The later is the preferred way to use git. Git will use your default ssh keys if you have them,you just need configure your account on the git repository with your public key, so it can identify your push requests as coming from you
Score:0
cn flag

Run

git config --global user.name "your_username"

This will set your user.name for git.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.