2

I've set up an account on a Gitea instance using the "Sign in with GitHub" feature, and that account has been given write access to a Gitea repository. When I try to push local changes to Gitea (using my shared GitHub and Gitea username), I'm prompted for a password. Giving my GitHub access token or password leads to the "authentication failed" message.

  • As a "Sign in with GitHub" user, can I push to Gitea from a local repository? If so, how?

The next thing I plan to try is setting a password for the Gitea account, using the User settingsAccount control panel. I'm not sure whether I can do this, since it requires me to enter a current Gitea password, which I don't have—and I'm worried that attempting to do it might screw up my existing ability to sign in with GitHub.

  • As a "Sign in with GitHub" user, can I set a Gitea password? If so, how?

I can't find any documentation of the "Sign in with GitHub" feature. Searching for documentation about external users and pushing with OAuth also turns up nothing.

  • Where's the documentation for the "Sign in with GitHub" feature?

2 Answers2

3

Take a look at the output from gitea admin user list and gitea admin auth list

There are examples of how to add github oauth to gitea in their documentation here: https://docs.gitea.com/administration/command-line#admin, but I'm not sure what is set up by default.

You can also set a user's password manually with gitea admin user change-password --username myname --password asecurepassword.

It looks like you should be able to log in using a generated access token as the password if nothing else. Gitea doesn't support 2fa for example, so this is the fallback: https://docs.gitea.com/usage/multi-factor-authentication

Cpt.Whale
  • 10,914
1

To answer the original question's first bullet point:

Make sure that you have cloned the repository using the SSH url from gitea, not the HTTP URL. You will need to create a key pair, labeled with the email address that the gitea instance has on record for you, and add the public key to your gitea account using the web interface. (On the top right dropdown that has to do with your account/login, select "Settings", then on the left select "SSH/GPG keys", and then use the "Add Key" button under "Manage SSH Keys" facility.) Then you should be able to push to the repository, assuming you have write access to it.