From Lost Account to Live Site: A GitHub & Jekyll Recovery Journey
It’s a situation many of us dread: losing access to a critical online account. In my case, it was an old GitHub account hosting my Design_Art_Research project, complete with a Jekyll-powered GitHub Pages site. With the original email address gone, recovery was impossible. But, armed with local copies of my code and a bit of determination, it was time to rebuild and get back online. This post chronicles that journey.
Laying the New Foundation: A Fresh Start
The first order of business was clear: a new GitHub identity.
- New GitHub Account: I created a new account, settling on the username
Setanta72. - Git Installation & Configuration: Although Git was operational on my Mac (and I have a Fedora Mini PC too), it was a good time to ensure it was up-to-date and configured with my new identity:
git config --global user.name "your.name" # Or your preferred name git config --global user.email "your.new.email@example.com" # Associated with Setanta72
The First Hurdle: Connecting to GitHub (The SSH Saga)
With a new account ready, the next step was to get my local Design_Art_Research project connected. I opted for SSH for its security and convenience, which led to a bit of a deep dive.
- Generating SSH Keys: On my Mac, I generated a new ED25519 SSH key pair:
ssh-keygen -t ed25519 -C "your.new.email@example.com" - Adding Public Key to GitHub: The public key (
~/.ssh/id_ed25519.pub) was dutifully copied and added to the SSH keys section of mySetanta72GitHub account settings. - The Infamous
Permission denied (publickey): My initial attempts to interact with a new (empty) repository forDesign_Art_Researchon GitHub were met with this dreaded error. This meant troubleshooting:- Verifying the key was indeed on GitHub.
- Ensuring
ssh-agentwas running (eval "$(ssh-agent -s)") and had the key loaded (ssh-add ~/.ssh/id_ed25519). - The breakthrough test:
ssh -T git@github.com. Once this returned a success message (“Hi Setanta72! You’ve successfully authenticated…”), I knew the SSH connection itself was sound.
Code Resurrected: Pushing the Local Repository
Before the initial push, my local Design_Art_Research repository needed a quick cleanup. git status revealed some tracked macOS .DS_Store files and editor backup files (*~).
.gitignoreto the Rescue: I created/updated the.gitignorefile in the project root:.DS_Store *~ # Add other OS-specific or build artifact patterns as needed- Cleaning Up Tracked Files: For files like
.DS_Storethat were already tracked, I usedgit rm --cached <file>to remove them from Git’s tracking without deleting them locally. The deletions of the*~files were also staged. - Committing the Cleanup:
git add .gitignore .DS_Store _posts/.DS_Store # and other affected files git commit -m "Clean up .DS_Store and editor backup files, update .gitignore" - Pointing to the New Remote:
- An empty repository named
Design_Art_Researchwas created on mySetanta72GitHub account. - Locally, I updated the remote URL:
# First, check existing remote: git remote -v # Then, either remove and add, or set-url: git remote set-url origin git@github.com:Setanta72/Design_Art_Research.git
- An empty repository named
- The Satisfying Push: With everything in place:
Success! The code, along with its history, was now safely on GitHub under my new account.git push -u origin main
Bringing the Site Back: Jekyll and GitHub Pages
My Design_Art_Research repository was originally a Jekyll site served via GitHub Pages. Restoring this functionality was paramount.
- GitHub Pages Configuration:
- In the
Setanta72/Design_Art_Researchrepository settings on GitHub, under “Pages”. - Source set to “Deploy from a branch”.
- Branch set to
mainand folder to/ (root).
- In the
- The Crucial
_config.yml: This file needed careful review, especially:url: "https://setanta72.github.io"baseurl: "/Design_Art_Research"(Absolutely critical for project sites so that assets and links resolve correctly). After committing and pushing any necessary changes to_config.yml, GitHub Actions automatically built and deployed the site.
- Victory! The site was live once more at
https://setanta72.github.io/Design_Art_Research/.
Smooth Sailing Ahead: Content Updates and Convenience
With the site restored, managing new content and optimizing workflow became the focus.
-
Standard Git Workflow for New Posts: When adding a new file (e.g., a blog post in
_posts/):- Create the file locally.
git status(to see the new untracked file).git add _posts/your-new-post.mdgit commit -m "Added new post: Title of Post"git pushThis ensures new content is committed locally, then pushed to GitHub to trigger a site rebuild.
-
Making Life Easier: Touch ID for SSH Passphrases (macOS): Being prompted for my SSH key passphrase every time was, frankly, “a pain in the arse.” The solution on macOS involved configuring
~/.ssh/config:Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519 # Or your specific keyAfter adding this, running
ssh-add ~/.ssh/id_ed25519prompted for the passphrase one last time, storing it in the macOS Keychain. Subsequent SSH operations now conveniently prompt for Touch ID.
Conclusion
What started as a frustrating loss of access turned into a valuable opportunity to rebuild, clean up, and streamline. My Design_Art_Research project is back on GitHub, the Jekyll site is live, and my workflow is more secure and convenient than before. It’s a testament to the power of local backups, version control, and a bit of systematic troubleshooting!