mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-06-02 00:00:17 +00:00
Remove private key requirement for tmpfs-mode
This commit is contained in:
parent
1a7b44d9f3
commit
4b798ecec8
|
@ -111,11 +111,17 @@ func mn(_ *cobra.Command, _ []string) {
|
|||
}
|
||||
lastKeyLocation = filepath.Join(usr.HomeDir, ".ssh/id_rsa")
|
||||
}
|
||||
|
||||
var authenticator *ssh.PublicKeys
|
||||
|
||||
if tmpFsMode == "" {
|
||||
var err error
|
||||
// create ssh key authenticator
|
||||
authenticator, err := ssh.NewPublicKeysFromFile(sshUser, lastKeyLocation, "")
|
||||
authenticator, err = ssh.NewPublicKeysFromFile(sshUser, lastKeyLocation, "")
|
||||
if err != nil {
|
||||
log.Fatalf("could not get git authenticator: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
fsCreator := func(branch string) billy.Filesystem {
|
||||
return memfs.New()
|
||||
|
|
|
@ -119,7 +119,6 @@ func (g *GitMode) RetrieveSource(pd *data.ProcessData) *data.ModeData {
|
|||
}
|
||||
_ = tagIter.ForEach(tagAdd)
|
||||
|
||||
if len(latestTags) == 0 {
|
||||
list, err := remote.List(&git.ListOptions{})
|
||||
if err != nil {
|
||||
log.Fatalf("could not list upstream: %v", err)
|
||||
|
@ -140,7 +139,6 @@ func (g *GitMode) RetrieveSource(pd *data.ProcessData) *data.ModeData {
|
|||
Tagger: commit.Committer,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for _, branch := range latestTags {
|
||||
log.Printf("tag: %s", strings.TrimPrefix(branch.remote, "refs/tags/"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user