Browse Source

Alias 'gitnonymous-exit' deactivates identity.

master
Chris McCormick 5 years ago
parent
commit
96bb86c3e2
2 changed files with 8 additions and 3 deletions
  1. 3
    3
      README.md
  2. 5
    0
      gitnonymous

+ 3
- 3
README.md View File

59
 
59
 
60
 	KEYNAME⚔ yourname@yourbox:~$
60
 	KEYNAME⚔ yourname@yourbox:~$
61
 
61
 
62
-To deactivate the gitnonymous environment run the same command again:
62
+To deactivate the gitnonymous environment run `gitnonymous-exit`:
63
 
63
 
64
-	KEYNAME⚔ yourname@yourbox:~$ . gitnonymous KEYNAME
64
+	KEYNAME⚔ yourname@yourbox:~$ gitnonymous-exit
65
 	yourname@yourbox:~$ _
65
 	yourname@yourbox:~$ _
66
 
66
 
67
 Or just exit the current shell.
67
 Or just exit the current shell.
70
 
70
 
71
 Whilst this will help you adopt a pseudonymous virtual identity, you should be aware of the following information leaks that may still be used to try to identify you, pointed out by @ryancdotorg on Hacker News:
71
 Whilst this will help you adopt a pseudonymous virtual identity, you should be aware of the following information leaks that may still be used to try to identify you, pointed out by @ryancdotorg on Hacker News:
72
 
72
 
73
- * Commit times will be leaked (narrows down sleeping/working hours).
73
+ * Commit times will be leaked (narrows down sleeping/working hours), although timezone is not exposed.
74
  * SSH client version will be leaked to servers you connect to (shows Linux distro version and patch level).
74
  * SSH client version will be leaked to servers you connect to (shows Linux distro version and patch level).
75
 
75
 
76
 ## Dependencies ##
76
 ## Dependencies ##

+ 5
- 0
gitnonymous View File

75
       # unset our environment variables we set
75
       # unset our environment variables we set
76
       unset _GITNONYMOUS_OLDPS1
76
       unset _GITNONYMOUS_OLDPS1
77
       unset _GITNONYMOUS
77
       unset _GITNONYMOUS
78
+      unalias "gitnonymous-exit"
78
       echo "Done unsetting ${keyname}."
79
       echo "Done unsetting ${keyname}."
79
     else
80
     else
80
       # add our custom local SSH key (make the key with ./make-anonymous-key)
81
       # add our custom local SSH key (make the key with ./make-anonymous-key)
127
       _GITNONYMOUS_OLDPS1="${PS1}"
128
       _GITNONYMOUS_OLDPS1="${PS1}"
128
       export PS1="${keyname}⚔ ${PS1}"
129
       export PS1="${keyname}⚔ ${PS1}"
129
       export _GITNONYMOUS="${keyname}"
130
       export _GITNONYMOUS="${keyname}"
131
+
132
+      echo "Run 'gitnonymous-exit' to exit this identity."
133
+      # alias exit command
134
+      alias "gitnonymous-exit"=". ${BASH_SOURCE[0]} ${keyname}"
130
     fi
135
     fi
131
   fi
136
   fi
132
 else
137
 else

Loading…
Cancel
Save