Skip to content

Foadsf/gyb-choco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GYB Chocolatey Package

This is the Chocolatey package for Got Your Back (GYB), a free and open‑source CLI tool to back up and restore Gmail.


📦 Installation

choco install gyb
gyb --version

To upgrade when a new version is published:

choco upgrade gyb

To uninstall:

choco uninstall gyb -y

🚀 Usage Examples

# Count messages in your mailbox
gyb --email you@example.com --action count

# Estimate backup size
gyb --email you@example.com --action estimate

# Perform a full backup
gyb --email you@example.com --action backup --local-folder GYB-Backup

# Restore messages
gyb --email you@example.com --action restore --local-folder GYB-Backup

🔑 Authentication Notes (Windows)

GYB uses OAuth2 to authenticate with Google. By default it tries to spin up a local webserver on ports 8080–8099 to receive the redirect from Google.

On some Windows systems these ports are blocked by security policies, resulting in errors like:

WinError 10013: An attempt was made to access a socket in a way forbidden by its access permissions

✅ Fallback Console Flow

As of version 1.95.0, we’ve patched GYB to automatically fall back to a console‑based OAuth flow when the local server cannot bind:

  1. GYB prints an authorization URL.
  2. The browser opens (if possible).
  3. After granting access, if the browser shows an error page, copy the full URL from the address bar.
  4. Paste either the full URL or just the code=... value back into the console.
  5. GYB exchanges the code for tokens and saves them in oauth2.txt.

Once authenticated, credentials are cached and you won’t need to repeat the flow unless tokens expire or are revoked.


🛠 Development Notes

  • The fallback implementation is tracked upstream in PR #515.
  • Changes include:
    • _wait_for_http_client now signals local_server_failed instead of crashing.
    • ShortURLFlow captures scopes in __init__ and uses them in fallback.
    • run_dual detects failure and switches to manual console OAuth.
  • This resolves Issue #370.

🤝 Maintainers

  • Current maintainer: Foad Farimani
  • Former maintainer: Jason Cumiskey (jtcmedia)

Community contributions are welcome. Please open issues or PRs against Foadsf/gyb-choco.


✅ Testing Checklist

Quick tests without doing a full backup:

gyb --email you@example.com --action count
gyb --email you@example.com --action estimate
gyb --email you@example.com --action print-labels

📌 Notes for Future Maintainers

  • Always bump the version in gyb.nuspec and update checksums when upstream releases.
  • Validate with:
    choco pack
    choco install gyb -s .
    gyb --version
    choco uninstall gyb -y
  • Push with:
    choco push gyb.<version>.nupkg --source https://push.chocolatey.org/
  • Keep moderation guidelines in mind: explicit <files>, no dev artifacts, clean PATH/shim handling.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published