At the moment I am working in WSL2 on Ubuntu (20.04.2). I have finished up my project and I want to commit my code to the repository I have made. However, whenever I want to commit I get the following error:
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
I do not know what is causing this error. I know my credentials are right. These are the command I excecute to commit my code:
git init
git add .
git commit -m "Finished Project"
git branch -M main
git remote add origin https://github.com/Myusername/my-repo.git
git push -u origin main
After the last command I get asked for my credentials and then I recieve the error.
I first thought it is because I am not using openSSL
and that is causing the error. If that is the case, how do I solve this problem?
EDIT: The error I receive when I use SSH:
Received disconnect from 140.82.121.3 port 22:11: Bye Bye
Disconnected from 140.82.121.3 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.