仓库的创建和git push都没有问题。但是再git clone的时候出现如下错误
git clone https://XXX/testgit.git
Cloning into 'testgit'...
Username for 'https://XXX': XXX
Password for 'https://XXX:
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
每一个仓库都是如此。进入之后是空文件夹没有内容。虽然可以通过一些操作看到内容但是很不方便。我这是哪一步出现了问题呢?
使用docker-compose部署,配置文件如下,
version: "3"
services:
codefever:
image: pgyer/codefever-community-lite:latest
ports:
- "5000:80"
- "5001:22"
depends_on:
- db
volumes:
- ./data/git-storage:/data/www/codefever-community/git-storage
- ./data/logs:/data/www/codefever-community/application/logs
environment:
DB_HOST: "db"
DB_PORT: "3306"
DB_USER: "root"
DB_PASS: "123456" # Need to be the same as MYSQL_ROOT_PASSWORD
DB_NAME: "codefever_community"
db:
image: mysql:5.7.31
restart: always
#privileged: true
volumes:
- ./data/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "123456"
command: [
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci',
'--max_connections=3000'
]
使用的是最新的镜像
[rui@gpu111 codefever]$ docker pull pgyer/codefever-community-lite:latest
latest: Pulling from pgyer/codefever-community-lite
Digest: sha256:67d046b0d220cfacc2125bfd4cc74eb25f19d7765933efec1d278faa74d55575
Status: Image is up to date for pgyer/codefever-community-lite:latest
docker.io/pgyer/codefever-community-lite:latest
[rui@gpu111 codefever]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
pgyer/codefever-community latest 864d830cb917 2 months ago 2.14GB
pgyer/codefever-community-lite latest ae003fb58060 4 months ago 1.76GB
mysql 5.7.31 42cdba9f1b08 2 years ago 448MB
在A机器上运行这个容器,在B机器上通过nginx反向代理到这个机器的5000端口,nginx配置文件如下。
server {
listen 80;
listen [::]:80;
server_name XXX.cn;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 ;
listen [::]:443 ssl http2 ;
server_name XXX.cn;
#allow 202.120.234.0/24;
#deny all;
ssl_certificate "/XXX.pem";
ssl_certificate_key "/XXXkey";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;# ssl_ciphers HIGH:!aNULL:!MD5;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 1024m;
if ($invalid_referer) {
return 403;
}
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
client_max_body_size 20000m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_pass http://192.168.25.111:5000;
}
}
question