handlers

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateUser

func AuthenticateUser(ctx ssh.Context, key ssh.PublicKey) bool

AuthenticateUser authenticates the user by checking if the user added their ssh key to the database

func ReceivePackHandler

func ReceivePackHandler(session ssh.Session)

This handler is once the user has authenticated It will run git-receive-pack only

It takes the command from the environment variable GIT_SSH_COMMAND which is handled by gliderlabs/ssh It then parses the command to get the repository name and then runs git-receive-pack The output of git-receive-pack is then sent to the user

If there is an error, it will be sent to the user The errors include: - The user is not allowed to access the repository (which appears for the user as if the repository does not exist) - The repository does not exist - The command is not git-receive-pack - The command is not formatted correctly

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL