0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Before You Commit Your Obsidian Vault Check the SpeakPen Sync Token

0
Posted at

Disclosure: This technical article was prepared with AI assistance for Qumge, the developer of SpeakPen. It documents SpeakPen Sync 0.3.3; linked source code and documentation support the product-specific claims.

You have SpeakPen voice notes arriving in Obsidian, and you keep the vault in Git. Before the next commit, you review the Markdown files. The file that deserves another look sits inside the hidden plugin configuration folder.

SpeakPen Sync saves its API token in the vault. If that configuration file enters your repository, the token can travel with it. You can keep voice capture and version-controlled notes together, but the credential needs its own rule.

Keep notes and credentials on separate paths

Workflow diagram: Git exclusion protects the token file, not the contents of the notes you choose to commit.

Know where the credential lives

With Obsidian's default configuration folder, SpeakPen Sync stores its settings here:

.obsidian/plugins/speakpen-sync/data.json

That file contains the token in plain text. It also holds the plugin's sync tracking, including which notes it has written and where it left them. The plugin documentation describes this storage explicitly.

A hidden directory is still an ordinary directory. Depending on your configuration, Git, a backup tool, or a service that copies your vault can include it. Sharing a complete vault as a template can include it too.

If you use a custom Obsidian configuration folder, substitute that folder for .obsidian in the paths below. Check the actual location before changing an ignore rule.

Understand the access you are protecting

The SpeakPen API token used by the plugin is read-only. It can read the account's note text; it cannot edit or delete notes or manage the account. The plugin itself fetches notes from SpeakPen and writes Markdown locally. It does not upload your vault or send your Obsidian edits back.

That still makes the token private. Someone holding it could read SpeakPen notes you never intended to publish, including notes that have not yet reached this vault. A carefully selected set of public Markdown files does not limit what the account credential can read.

This gives you two separate review tasks:

  • Decide which note contents belong in the repository.
  • Keep the credential that can fetch other notes out of the repository.

Ignoring the credential file handles only the second task. Synced transcripts still deserve the same review as anything else you write or publish.

Check Git without printing the token

Run these commands locally from the vault's Git repository root. Neither command prints the contents of the credential file.

First, check whether Git already tracks it:

git ls-files -- .obsidian/plugins/speakpen-sync/data.json

If the path appears, the file is tracked in the current index. If nothing appears, it is not currently tracked. An empty result does not prove that the file was never committed in the past.

For a repository whose root is the vault, add this narrow rule to its .gitignore:

/.obsidian/plugins/speakpen-sync/data.json

This leaves the plugin's local settings and tracking file in place while excluding it from ordinary future Git additions. If the vault sits inside a larger repository, adjust the rule relative to that repository's root.

Check which ignore rule matches:

git check-ignore -v --no-index -- .obsidian/plugins/speakpen-sync/data.json

You should see the matching ignore rule and the path. The --no-index option lets you inspect ignore matching even when a file is already tracked. It does not stop tracking that file.

That distinction matters: Git's ignore rules do not affect files that are already tracked. If your first command returned the path, and you have dealt with any exposure, remove that file from Git's index while retaining the local copy:

git rm --cached -- .obsidian/plugins/speakpen-sync/data.json

Review the staged change locally before committing. Git should show the file being removed from the repository, while the working copy remains on disk for the plugin. If Git refuses the command because of staged or local differences, inspect the situation rather than adding a force flag.

Run the tracking check again. It should now return no path. The ignore check should still show a matching rule. Removing a tracked file this way does not erase it from older commits.

If the token has already been shared, revoke it first

If the credential appeared in a public repository, a shared archive, or another place people should not have access to it, start in SpeakPen. Open Settings → Connections, find the exposed token in the token management area, and revoke it.

Creating another token alone does not revoke the first one. Removing the file from the latest commit also leaves older copies usable while that credential remains valid.

GitHub's guidance on exposed credentials puts revocation or rotation before repository cleanup. Follow that order. History cleanup may still be appropriate, but it needs care, especially when other people have clones. Revoking access cannot retrieve note text someone already downloaded.

After revocation, fix the repository exclusion before placing a replacement token in the plugin. Check any other place you deliberately copied that configuration. A .gitignore rule affects Git; it does not control cloud-drive copies, ZIP archives, screenshots, or backup permissions.

Replace the token without throwing away sync tracking

There is no need to delete the plugin's data file merely to change a credential.

In SpeakPen, generate a new token for the same account. Paste it into the API token field in SpeakPen Sync's Obsidian settings, then run Sync now. Use the current plugin version; this behavior is present in the 0.3.3 release.

The plugin verifies the account ID and looks up that account's saved sync state. With the existing state intact, rotating the token for the same account preserves its cursor and note tracking. A different string in the token field does not by itself require another copy of every note.

Deleting data.json also deletes that local tracking. The files already in your vault remain, but a fresh plugin state cannot simply assume it knows which files it created before. Keeping the state while replacing the credential avoids introducing that separate problem.

Switching to a different SpeakPen account is another case. The plugin maintains separate account tracking, but existing Markdown files remain in the vault. Changing credentials does not remove the previous account's notes from a folder you are about to share.

Make one recording the final check

After securing the configuration, test the part you installed SpeakPen for. Record one ordinary thought you want to keep, wait until its text is available in SpeakPen, and run a manual sync in Obsidian. Find the Markdown note and read the transcript.

Then check the proposed Git changes before committing. The note may be something you want to keep in your repository. The plugin data file should stay local and ignored. Audio is not embedded as a permanent link in the generated Markdown, so review the text as text rather than treating it as an audio backup.

You now have a concrete boundary: selected files can enter Git, while the credential used to fetch your private voice notes stays out. Follow the SpeakPen to Obsidian setup guide, verify the token file's Git exclusion, and sync one recording before adding voice capture to your daily vault routine.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?