Skip to content

Commit 4a66dbe

Browse files
authored
Bug/authorized key backup (#2)
* Update gitignore to ignore any build files or 3rd party dependancies that are brought in during the build process * Fixed issue with authorized keys not backing up
1 parent 505fcd5 commit 4a66dbe

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
*.code-workspace
22
.idea
33
.DS_Store
4+
pkg/*
5+
src/*
6+
!src/cmd/*
7+
!src/.cobra.yml
8+
!src/serverauth.go
9+
serverauth

src/cmd/add.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var addCmd = &cobra.Command{
7575
homeDir := u.HomeDir
7676
keysDir := homeDir + "/.ssh"
7777
keysFile := keysDir + "/authorized_keys"
78-
backupKeysFile := keysDir + "/.ssh/authorized_keys.bak"
78+
backupKeysFile := keysDir + "/authorized_keys.bak"
7979

8080
// If the .ssh directory doesnt exist, create it and set it to be owned by the user
8181
if _, keysDirErr := os.Stat(keysDir); os.IsNotExist(keysDirErr) {

0 commit comments

Comments
 (0)