1

Environment

  • client : Windows
  • server : Gogs

I'd like to push some sources to git repository.

But there are some problems to push it.

Error message is below :

D:\workspace\excel-demo>git push -u origin master Counting objects:
42, done. Delta compression using up to 8 threads. Compressing
objects: 100% (28/28), done. Writing objects: 100% (42/42), 50.75 KiB
| 2.82 MiB/s, done. Total 42 (delta 2), reused 0 (delta 0) error: RPC
failed; HTTP 403 curl 22 The requested URL returned error: 403
Forbidden fatal: The remote end hung up unexpectedly fatal: The remote
end hung up unexpectedly Everything up-to-date

I was set up credential in remote information like test@~~~~/~~~.git

What should I do?

fuggerjaki61
  • 822
  • 1
  • 11
  • 24
Dev OneQ
  • 11
  • 2

4 Answers4

2

test@~~~~/~~~.git is not a "credential" (login/password), but an SSH URL which means: connect to the remote server as user 'test', and use ~~~.git as a remote Git repository destination.

That supposes you have an SSH key pair in your %USERPROFILE%.ssh.
And that the public key (id_rsa.pub) was registered on the remote server in ~test/.ssh/authorized_keys.

If that is not the case, you need to check how the remote server expects you to authenticate (username/password? SSH key?)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

At first I thought i may be -u option ad master will already be set up, but you would get a nice git message.

I think you may not have write access or your credentials are wrong.

tymtam
  • 31,798
  • 8
  • 86
  • 126
0

Try with :git push origin master Then it will ask for password. Enter your proper credentials and hope it works. If nothing works. Delete your repository and make a fresh push.

Sankar Boro
  • 121
  • 1
  • 8
0

Try to add a new Collaborator. On GOGs access the repository and go to 'Settings' > 'Collaboration' > [add a valid GOGs login name] > click on 'Add New Collaborator'. After that (at least for me) the push was successful!

Marcelo Luz
  • 500
  • 4
  • 7