mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-09-27 20:34:09 +00:00
Fix authenticator for tmpfs-mode
This commit is contained in:
parent
2f870d84b0
commit
b7acbd6f01
@ -22,6 +22,12 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"os/user"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/go-git/go-billy/v5"
|
"github.com/go-git/go-billy/v5"
|
||||||
"github.com/go-git/go-billy/v5/memfs"
|
"github.com/go-git/go-billy/v5/memfs"
|
||||||
"github.com/go-git/go-billy/v5/osfs"
|
"github.com/go-git/go-billy/v5/osfs"
|
||||||
@ -31,11 +37,6 @@ import (
|
|||||||
"github.com/rocky-linux/srpmproc/internal/blob/gcs"
|
"github.com/rocky-linux/srpmproc/internal/blob/gcs"
|
||||||
"github.com/rocky-linux/srpmproc/internal/blob/s3"
|
"github.com/rocky-linux/srpmproc/internal/blob/s3"
|
||||||
"github.com/rocky-linux/srpmproc/internal/data"
|
"github.com/rocky-linux/srpmproc/internal/data"
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"os/user"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/rocky-linux/srpmproc/internal"
|
"github.com/rocky-linux/srpmproc/internal"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@ -116,13 +117,11 @@ func mn(_ *cobra.Command, _ []string) {
|
|||||||
|
|
||||||
var authenticator *ssh.PublicKeys
|
var authenticator *ssh.PublicKeys
|
||||||
|
|
||||||
if tmpFsMode == "" {
|
var err error
|
||||||
var err error
|
// create ssh key authenticator
|
||||||
// create ssh key authenticator
|
authenticator, err = ssh.NewPublicKeysFromFile(sshUser, lastKeyLocation, "")
|
||||||
authenticator, err = ssh.NewPublicKeysFromFile(sshUser, lastKeyLocation, "")
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatalf("could not get git authenticator: %v", err)
|
||||||
log.Fatalf("could not get git authenticator: %v", err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fsCreator := func(branch string) billy.Filesystem {
|
fsCreator := func(branch string) billy.Filesystem {
|
||||||
|
Loading…
Reference in New Issue
Block a user