How to Securely Manage GitLab PATs – A Practical Guide Using pass

I used to treat GitLab Personal Access Tokens (PATs) rather casually, but while working on an automation task using a Dockerfile, I realized they are not a simple matter. At first, I used the common approach of embedding the token directly into the URL: 1 https://oauth2:<token>@gitlab.com/username/project.git While convenient, I quickly realized this method is very insecure. If the token is included in a Dockerfile and that file is accidentally committed or shared, anyone with access to it can use the token to access GitLab. Additionally, if the token expires or is regenerated, you must manually update all related scripts and configuration files. ...

May 27, 2025 · 3 min · Sangheon Han

Securely Using GitLab Personal Access Tokens with Prompt Input

When pushing code to a GitLab repository, it’s often best to avoid including your personal access token (PAT) directly in the URL for security reasons. This is especially important when working on public machines or in shared environments where sensitive data could be exposed. In this post, we’ll walk through how to use your GitLab Personal Access Token more securely by entering it via a prompt. 1. Set the Remote Repository URL Set your remote repository URL in the standard HTTPS format. Using a token-free URL ensures Git will prompt you for credentials. ...

May 26, 2025 · 2 min · Sangheon Han

How to Fix Gmail Archive Issues in the macOS Mail App

To maintain a consistent email experience across macOS, iOS, and iPadOS, I’ve been primarily using the default Mail app. Integrating Gmail via IMAP is simple, and address book and calendar sync works well, so I’ve used this setup for years without much trouble. However, I recently encountered a strange issue: when I archived a message received through my Gmail account in the macOS Mail app, the message didn’t disappear from the Inbox as expected. Oddly, this behavior only occurred on macOS—on iOS and iPadOS, the same archive action worked perfectly. ...

May 8, 2025 · 4 min · Sangheon Han