Reputation: 393
I am new to Gitea and Git and thought to install Gitea through docker on a Windows 10 computer to test it out before deploying it elsewhere, but I kind of got stuck right at the end. I can open Gitea inside the browser and create repositories and so on, the problem occurs when I want to execute git push -u origin master
The error is :
remote: invalid credentials
fatal: Authentication failed for ‘http://localhost:3000/user/test.git/’
This is my docker-compose.yml file (I followed the instructions on the Gitea website) :
version: "2"
networks:
gitea:
external: false
volumes:
gitea:
driver: local
services:
server:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=mysql
- DB_HOST=db:3306
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=gitea
restart: always
networks:
- gitea
volumes:
#- ./gitea:/data
- gitea:/data
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: mysql:5.7
restart: always
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql
Upvotes: 1
Views: 3290
Reputation: 393
I will answer my own question here, it may help someone else with the same problem. I solved it with the help of the answer to this question on Stack overflow. The problem was solved after setting the correct username and password in the Windows credential manager.
Upvotes: 1