Git Product home page Git Product logo

git-lfs-server's Introduction

Git LFS server

Project frozen Project unmaintained Build Status Coverage Status

Simple HTTP(S) server for Git Large File Storage with PAM authentication.

$ ./lfs_server.sh -help
Start Git LFS server

  lfs_server [ROOT]

=== flags ===

  [-cert file]    File of certificate for https
  [-key file]     File of private key for https
  [-p port]       TCP port to listen on
  [-pam service]  PAM service name for user authentication
  [-s address]    IP address to listen on
  [-verbose]      Verbose logging
  [-build-info]   print info about this build and exit
  [-version]      print the version of this build and exit
  [-help]         print this help text and exit
                  (alias: -?)

By default, it starts on http://localhost:8080 and treats current directory as ROOT. All object files are stored locally in ROOT/.lfs/objects directory.

INSTALL

From binary packages:

RUN

HTTP server without authentication

./lfs_server.sh -verbose -s IP_ADDRESS -p PORT

A server will ignore credentials passed by LFS client, and accept all connections. To enable authentication, you need to specify PAM service.

HTTP server with PAM authentication

./lfs_server.sh -verbose -pam login -s IP_ADDRESS -p PORT

It will use built-in login PAM service defined in /etc/pam.d/login file.

Warning: LFS client uses HTTP basic authentication, so using HTTPS is a must!

HTTPS server with PAM authentication

./lfs_server.sh -verbose -pam login -s IP_ADDRESS -p PORT -cert domain.crt -key domain.key

Example

Download and install the LFS server as described above. You will also need to install the GIT LFS client.

# Start a LFS server
./lfs_server.sh

# Clone a repo
git clone ....
cd repo

# Add a normal file
touch test.txt
git add test.txt
git commit -m "normal file"

# Add a lfs file 
git lfs install
dd if=/dev/zero of=test.bin count=10240 bs=1024   # Create a file which is 10MB
git lfs track test.bin
git add .gitattributes test.bin
git commit -m "lfs file"

# Configure lfs remote to local server
git config -f .lfsconfig lfs.url http://localhost:8080
git add .lfsconfig
git commit -m "lfs config"

# Push changes
git push

TODO

  • Multi server support
  • Create OPAM package
  • Add max file size option
  • Add connection timeouts
  • Authentication
  • Automated tests
  • Setup Travis continuous builds
  • Setup Coverals
  • Remove incomplete/broken temporary files
  • Upload validation (calculate SHA-256 digest)
  • Reject uppercase SHA-256 hex digests
  • Fix HTTPS urls
  • Rearrange files in release package and remove redundant libs
  • Add logging
  • Check SIGQUIT and SIGINT are handled correctly
  • HTTPS support (trivial to add)
  • Speed-up uploading (fixed in cohttp, see #330)

git-lfs-server's People

Contributors

artemkin avatar joshlk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-lfs-server's Issues

How to force authentication at git lfs server side

We have found that any one can push to the lfs server even if no credential entered
or when we close write permission on lfs directory for certain group seems its not even depending on file system permission
only http
is there any way to force authentication so its not none as below

[user@test]$ git lfs env
git-lfs/1.1.1 (GitHub; linux amd64; go 1.5.3; git 7de0397)
git version 2.7.0

Endpoint=http://ip_address:port (auth=none)
LocalWorkingDir=

Kindly help

exception while running

Tried to run version 0.3.0 on Ubuntu 17.10 with the command line for server without authentication:

$ sudo ./lfs_server.sh -verbose -s localhost -p 8080
Uncaught exception:
  
  (Unix.Unix_error "Illegal seek" sysconf "")

Raised by primitive operation at file "src/core_unix.ml", line 347, characters 14-29

404 Not Found "Wrong path

I am not able to push to bare repository

Create a bare repo
Cloned it to local repo
installed git-lfs on client
then
git lfs track *.rpm
git add "file.rpm"
git commit -m "test"
git lfs ls-files --> shows the file

editing .gitconfig to point to server url
from local repo
git push origin master
then entering credentials and keep uploading

at server
./lfs_server.sh -s ip address
2016-02-12 19:18:47.508593Z Listening for HTTP on ip_address:8080
2016-02-12 19:20:43.007939Z Error ip_address "POST /objects/batch HTTP/1.1" 404 Not Found "Wrong path

I am using my home dir and its shared between client and server so .gitconfig is the same

could you please clarify as i understand all whats need from server side is

[user@git lfs_server]# ls -rlt
total 4
drwxrwxrwx. 2 owner owner 47 Aug 26 13:14 lib
-rwxrwxrwx. 1 owner owner 199 Aug 26 13:14 lfs_server.sh
drwxrwxrwx. 2 owner owner 23 Aug 26 13:14 bin
[user@git]# cd
[user@git]# ./lfs_server.sh -s ip_address

please help

repo segmented data storage

Hi,

is there a way for the lfs server to store the hash files in a different place depending on the repo that from where I am pushing to the server?

Missing library in Mac OS X binary

The binary fails to load the libffi.6.dylib:

% ./lfs_server.sh 
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
  Referenced from: /Users/smaret/Downloads/lfs_server/./bin/lfs_server
  Reason: image not found
./lfs_server.sh: line 11: 81786 Trace/BPT trap: 5       ${PREFIX}/bin/lfs_server $@

I do have such a library, but in opt/local/lib/libffi.6.dylib (MacPorts installation directory).

Git LFS Server Fails to Create Files While Running Inside Docker Container With Volume as Objects Directory

This issue might not be caused by git-lfs-server but wanted to see if anyone else was struggling with similar problems getting git-lfs-server deployed inside a docker container with a mounted data volume as the objects directory.

This is using git-lfs-server release number 0.3.1

When deploying git-lfs-server in a docker container everything works mostly as expected. However if you try to use a volume to persist data in between container instantiations suddenly this error starts to appear in the logs:

git-lfs-server_1  | 2019-10-22 18:59:18.581475Z Error 172.20.0.1 Failure: with_file_atomic could not create file

If I check the volume directory it appears that the git-lfs-server can create empty directories but not files. If I log into the container I seem to have all the required permissions to read and write files on the volume mount and can create large test files using dd

After letting the server rest idle for a few minutes this error shows up in the logs:

git-lfs-server_1  | 2019-10-22 19:51:08.225611Z Error 172.20.0.1 Exception: ("Writer error from inner_monitor" "writer fd unexpectedly closed "
git-lfs-server_1  |   (writer
git-lfs-server_1  |     ((id 413)
git-lfs-server_1  |       (fd
git-lfs-server_1  |         ((file_descr 20)
git-lfs-server_1  |           (info
git-lfs-server_1  |             (socket
git-lfs-server_1  |               ((listening_on
git-lfs-server_1  |                  ((type_ ((family PF_INET) (socket_type SOCK_STREAM)))
git-lfs-server_1  |                    (fd
git-lfs-server_1  |                      ((file_descr 8)
git-lfs-server_1  |                        (info
git-lfs-server_1  |                          (replaced
git-lfs-server_1  |                            (listening
git-lfs-server_1  |                              (previously_was
git-lfs-server_1  |                                (replaced
git-lfs-server_1  |                                  ((socket (bound_on 0.0.0.0:55600))
git-lfs-server_1  |                                    (previously_was
git-lfs-server_1  |                                      (socket
git-lfs-server_1  |                                        ((family PF_INET)
git-lfs-server_1  |                                          (socket_type SOCK_STREAM))))))))))
git-lfs-server_1  |                        (kind (Socket Passive)) (supports_nonblock true)
git-lfs-server_1  |                        (have_set_nonblock true) (state (Open Empty))
git-lfs-server_1  |                        (watching
git-lfs-server_1  |                          ((read (Watch_once Empty)) (write Not_watching)))
git-lfs-server_1  |                        (watching_has_changed false) (num_active_syscalls 1)
git-lfs-server_1  |                        (close_finished Empty)))))
git-lfs-server_1  |                 (client 172.20.0.1:35346))))
git-lfs-server_1  |           (kind (Socket Active)) (supports_nonblock true)
git-lfs-server_1  |           (have_set_nonblock true) (state Closed)
git-lfs-server_1  |           (watching ((read Not_watching) (write Not_watching)))
git-lfs-server_1  |           (watching_has_changed false) (num_active_syscalls 0)
git-lfs-server_1  |           (close_finished (Full ()))))
git-lfs-server_1  |       (monitor
git-lfs-server_1  |         (((name (id 14609)) (here ()) (id 14609) (has_seen_error false)
git-lfs-server_1  |            (is_detached true))
git-lfs-server_1  |           ((name "") (here ()) (id 2) (has_seen_error false)
git-lfs-server_1  |             (is_detached true))))
git-lfs-server_1  |       (inner_monitor
git-lfs-server_1  |         (((name (id 14610)) (here ()) (id 14610) (has_seen_error true)
git-lfs-server_1  |            (is_detached true))
git-lfs-server_1  |           ((name "") (here ()) (id 2) (has_seen_error false)
git-lfs-server_1  |             (is_detached true))))
git-lfs-server_1  |       (background_writer_state Stopped_permanently)
git-lfs-server_1  |       (background_writer_stopped (Full ())) (syscall Per_cycle)
git-lfs-server_1  |       (bytes_received 225) (bytes_written 0) (scheduled_bytes 0)
git-lfs-server_1  |       (scheduled_back 0) (back 0) (close_state Open) (close_finished Empty)
git-lfs-server_1  |       (close_started Empty) (num_producers_to_flush_at_close 0)
git-lfs-server_1  |       (flush_at_shutdown_elt (<opaque>))
git-lfs-server_1  |       (check_buffer_age
git-lfs-server_1  |         (((writer <opaque>) (maximum_age 2m)
git-lfs-server_1  |            (bytes_received_at_now_minus_maximum_age 0)
git-lfs-server_1  |            (bytes_received_queue ()) (times_received_queue ()) (bytes_seen 0)
git-lfs-server_1  |            (too_old Empty))))
git-lfs-server_1  |       (consumer_left Empty) (raise_when_consumer_leaves false)
git-lfs-server_1  |       (open_flags (Full (Ok (rdwr)))) (line_ending Unix))))

Here is my git/lfs version information:

git-lfs/2.3.4 (GitHub; linux amd64; go 1.8.3)
git version 2.17.1

Simple example

Hey,

I would like to set-up a git-lfs-server but keep GitHub as the normal git remote. I'm trying to create a simple example but running into some difficulty. I would be very grateful if you can help me.

On the server side (Ubuntu, $IP is the IP of the server):

# Unpack and run lfs_server
wget https://github.com/artemkin/git-lfs-server/releases/download/v0.3.0/lfs_server-0.3.0-linux.x64.tar.gz
tar xfs lfs_server-0.3.0-linux.x64.tar.gz
cd lfs_server
mkdir data
./lfs_server.sh -s $IP -p 5000 data

On my local computer (Mac):

# Clone a new repo
git clone [email protected]:joshlk/lfs_test.git
cd lfs_test

# Install LFS, track a file and commit
git lfs install
mkfile -n 10m test.bin
git lfs track test.bin
git add .gitattributes test.bin
git commit -m "LFS file"

# Configure LFS remote
git config -f .lfsconfig lfs.url http://$IP:5000/joshlk/lfs_test.git
git add .lfsconfig

# Try to push the newly added LFS file
git push

I then get the error on my local computer:

Git LFS: (0 of 1 files) 0 B / 10.00 MB
batch response: Wrong path
error: failed to push some refs to '[email protected]:joshlk/lfs_test.git'

And if I look at the server output:

2018-01-18 11:32:54.947849Z Listening for HTTP on $IP:5000
2018-01-18 11:40:20.303692Z Error 192.168.10.102 "POST /joshlk/lfs_test.git/locks/verify HTTP/1.1" 404 Not Found "Wrong path"

Do I need to add additional folders or do any additional commands?

The git lfs client I installed using brew and the version is: git-lfs/2.3.4 (GitHub; darwin amd64; go 1.9.1)

Cannot build docker image: "[ERROR] No switch 4.04.2 is currently installed."

I cannot build the provided docker image. I get:

$ sudo docker build . -t git-lfs-server
[cut]
Step 24/27 : RUN su - test -c 'opam switch 4.04.2'
 ---> Running in abed75f14b51
[ERROR] No switch 4.04.2 is currently installed. Did you mean 'opam switch create 4.04.2'?
        Installed switches are:
          - default

Removing that line then gives

Step 25/26 : RUN su - test -c 'opam install async async_ssl cohttp cohttp-async cryptokit yojson simple_pam utop'
 ---> Running in c3dec28be258
The following dependencies couldn't be met:
  - cohttp-async -> ocaml >= 4.03.0
      base of this switch (use `--unlock-base' to force)

No solution found, exiting

I think the problem is that the Ubuntu trusty version of Ocaml is too old for the current version of cohttp-async.

I tried changing the base Dockerfile image to ubuntu:bionic, and I get further, but then it fails to compile several packages:

[ERROR] The compilation of conf-zlib failed at "/usr/bin/pkg-config zlib".
...
[ERROR] The compilation of ctypes failed at "/usr/bin/make XEN=disable ctypes-foreign".
...
[ERROR] The compilation of ppx_inline_test failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_inline_test -j 1".
[ERROR] The compilation of ppx_js_style failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_js_style -j 1".
[ERROR] The compilation of ppx_let failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_let -j 1".
[ERROR] The compilation of ppx_optional failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_optional -j 1".
[ERROR] The compilation of ppx_pipebang failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_pipebang -j 1".
[ERROR] The compilation of ppx_sexp_conv failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_sexp_conv -j 1".
[ERROR] The compilation of variantslib failed at "/home/test/.opam/default/bin/jbuilder build -p variantslib -j 1".
[ERROR] The compilation of ppx_fields_conv failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_fields_conv -j 1".
#=== ERROR while compiling uri.3.0.0 ==========================================#
# path                 ~
# command              /bin/cp -PRp /home/test/.opam/default/.opam-switch/sources/uri.3.0.0 /home/test/.opam/default/.opam-switch/build/uri.3.0.0
# exit-code            1
# env-file             ~/.opam/log/log-7-6667f8.env
# output-file          ~/.opam/log/log-7-6667f8.out

I could keep debugging, but I think it would benefit from the eyes of an ocaml expert!

Setup with Proxy not working

Hello

I tried to setup the server with a Apache HTTP Server in a Proxy Setup, because the git Server is running behind a Firewall with a Reverse Proxy in front of it.

With the setup as:

<Location "/gitlfs/">
  ProxyPreserveHost On
  ProxyPass  http://127.0.0.1:8081/
  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"
  Require all granted
</Location>

and running as:

lfs_server.sh -verbose -s 127.0.0.1 -p 8081
./lfs_server
2019-03-25 16:16:30.224961+01:00 Listening for HTTP on 127.0.0.1:8081


2019-03-25 16:16:37.244723+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:17:40.574301+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:18:43.650446+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:19:46.964631+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:20:50.057109+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:21:53.179640+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:22:56.251200+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:23:59.320916+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:25:02.603886+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK

the git client push gives a:

$ git push
Uploading LFS objects:   0% (0/3), 0 B | 0 B/s, done
LFS: Put http://gitserver.domain.com:8081/objects/1da2187dd695a85136920e9aac633fefdc236418d1dbb40b0babdcc961e9d49b: dial tcp 192.168.51.123:8081: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
LFS: Put http://gitserver.domain.com:8081/objects/9a7eb7e95b62d4c5659571356f3b7adc91f2b85f3b2ad0d840288d3aa0d358b2: dial tcp 192.168.51.123: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
LFS: Put http://gitserver.domain.com:8081/objects/9495f0f0a5bee39b13647cc31d0011d910149bf4225452c4925713a893e8d673: dial tcp 192.168.51.123:8081: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
error: failed to push some refs to 'https://[email protected]/git/MyRepo.git'

Apache Logs gives no problem either:
192.168.51.123 - - [25/Mar/2019:16:16:37 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:17:40 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:18:43 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:19:46 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:20:50 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:21:53 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:22:56 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:23:59 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:25:02 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504

Could someone please help?
Thanks
Hartmut

Issue with letsencrypt SSL certificate

I'm trying to get a simple server working without PAM authentication but with an SSL cert that I got from letsencrypt.org. They give me four files in PEM format:

cert.pem
chain.pem
fullchain.pem
privkey.pem

Here is the command I use to launch the server:

sudo ./lfs_server.sh -verbose -s 10.0.0.4 -p 443 -cert ./fullchain.pem -key ./privkey.pem

I can browse some existing objects that I uploaded via HTTP and download them, with chrome showing no problems with the certificate:

2019-04-24 22:43:38.330690Z Info <my IP address> "GET /objects/21a39a766c8e8033091fc2c2ccf87113f68379043e1840a3a5b34b2b6eecfc83 HTTP/1.1" 200 OK
2019-04-24 22:44:11.466473Z Info <my IP address> "GET /data/objects/21a39a766c8e8033091fc2c2ccf87113f68379043e1840a3a5b34b2b6eecfc83 HTTP/1.1" 200 OK

But when I do a git push with some LFS content, the following happens:

2019-04-24 22:36:18.642634Z Error <my IP address> Exception: (Ssl_error
  ("error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate")
  src/ssl.ml:151:4)

On the client side, I get these errors:

Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done
batch response: Post https://<my LFS server>:443/objects/batch: x509: certificate signed by unknown authority
error: failed to push some refs to '<my git repository>'

Any idea what I'm doing wrong here? Is there a way to find out WHY it thinks it's a bad certificate? I checked that the certs up the chain are trusted by both server and client.

The server works fine on HTTP, but obviously I'd like to get this working on HTTPS and start using PAM authentication to keep it secure.

Cannot build docker image: "No permissions to creating new namespace" error

When I try to build the provided Dockerfile, I get an error

$ sudo docker build . -t git-lfs-server
[cut]
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ocaml-system failed at "/home/test/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml".
-> installed base-bigarray.base
-> installed base-threads.base
-> installed base-unix.base

#=== ERROR while compiling ocaml-system.4.02.3 ================================#
# context              2.0.4 | linux/x86_64 |  | https://opam.ocaml.org#94c62049
# path                 ~/.opam/default/.opam-switch/build/ocaml-system.4.02.3
# command              ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code            1
# env-file             /tmp/opam-xxx-7/ocaml-system-7-b76d46.env
# output-file          /tmp/opam-xxx-7/ocaml-system-7-b76d46.out
### output ###
# bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.
[cut]

I tried running the sysctl command, but it didn't help. The host machine is running Ubuntu 18.04.2 LTS.

Adding --disable-sandboxing, as recommended at ps://github.com/ocaml/opam-repository/issues/12050#issuecomment-393478072, seems to work around this issue, and since we are running in a container anyway, should be fine. i.e.

RUN su - test -c 'opam init --disable-sandboxing'

Requesting a quick example on getting this working

I've been trying to get this working for a while now without any success. I'm running with HTTPS and the service seems to be running fine. URL requests to the link response with 401 Unauthorized.

I'm starting lfs_server via ./lfs_server.sh /opt/git -verbose -s 0.0.0.0 -p 8080 -pam ssh -cert ~/cert.crt -key ~/key.key

git lfs env shows the correct URL, that is: https://hostname.com:8080

Is there something i'm missing? I think maybe something regarding the ROOT path? When I add new files that are being tracked by Git LFS i'm not seeing any HTTPS requests either. Any help is appreciated as are any documents that may help clarify the workflow of Git LFS and its requirements

How do I build the software?

I am unable to build the software. I have upgraded Ocaml to 4.04.0, and I have installed sexplib via opam. I have guessed at the build command line as there is no documentation:

> scripts/build.sh src/lfs_server.native
+ ocamlfind ocamldep -syntax camlp4o -package sexplib.syntax -package core,async,async_ssl,cohttp,cohttp.async,yojson,cryptokit,simple_pam -modules src/lfs_server.ml > src/lfs_server.ml.depends
ocamlfind: Package `sexplib.syntax' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.

Getting PAM authentication working

I am unable to get the server to work when I start it with PAM authentication:

./lfs_server.sh -verbose -pam login -p 8080

I have gitolite return this:

ssh -l gitolite localhost git-lfs-authenticate
{
"href": "http://localhost:8080",
"header": {
"Authorization": "git_lfs git_lfs"
}
}

But lfs_server doesn't like the login/password:

Error 127.0.0.1 "POST /objects/batch HTTP/1.1" 401 Unauthorized "The authentication credentials are incorrect"

journalctl -f shows no activity, even though I added the debug keyword to PAM's /etc/pam.d/login auth lines. Conversely when I log in on this computer as git_lfs, it does show some output. So, I'm not convinced that lfs_server is actually consulting PAM here. Does the JSON output above need to have the Authorization field in base64 encoding? I could not find a definitive answer on that online, but looking at the git-lfs client code it seems that it does the base64 encoding itself.

Is there a way to see from lfs_server's point of view what the credentials are? I tried looking at this code but I do not know this programming language.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.