Common Issues
Invalid URL Error
Invalid URL Error
Error Message:Cause:
The URL provided is not a valid GitHub URL or is malformed. The URL validation happens in src/parser.rs:15-18.Solutions:
-
Check URL Format
Ensure your URL follows the correct GitHub format:
-
Verify URL is Complete
The URL must include at least the username and repository:
-
Check for Typos
Common mistakes:
- Missing
https:// - Misspelled domain (e.g.,
githib.com) - Extra or missing slashes
- Missing
- Test URL in Browser Copy the URL and paste it in your browser to verify it works
Error Parsing URL
Error Parsing URL
Error Message:Cause:
The URL structure doesn’t match the expected GitHub repository pattern. The parser requires at least username and repository name (src/parser.rs:29-31).Solutions:
-
Ensure Minimum Path Components
The URL must have at least 3 path segments:
-
Use Full Repository URLs
For specific files or directories, use the full tree URL:
-
Avoid Fragment or Query Parameters
Remove any
#fragments or?query parameters from the URL
API Rate Limit Exceeded
API Rate Limit Exceeded
Error Message:Cause:
GitHub limits unauthenticated requests to 60 per hour. Without a token, you’ll hit this limit quickly.Solutions:
-
Set Up Authentication
The most effective solution - increases limit to 5,000 requests/hour:
See Authentication for detailed setup.
-
Check Current Rate Limit
Verify your current usage:
-
Wait for Reset
Rate limits reset every hour. Check the reset time:
- Use Authenticated Token Create a GitHub personal access token and set it as an environment variable (documented in src/requests.rs:65-67)
Network Connection Errors
Network Connection Errors
Error Message:Cause:
Network connectivity issues preventing the tool from reaching GitHub’s API.Solutions:
-
Check Internet Connection
Verify you can reach GitHub:
-
Check Proxy Settings
If behind a corporate proxy, ensure it’s configured:
-
Verify DNS Resolution
Test DNS lookup:
- Check Firewall Rules Ensure outbound HTTPS (port 443) is allowed
- Try Different Network Test on a different network to isolate the issue
Permission Denied / File Not Found
Permission Denied / File Not Found
Error Message:Cause:
Either the repository is private and requires authentication, or the specified path doesn’t exist.Solutions:
-
For Private Repositories
Set up authentication with appropriate permissions:
Ensure your token has
reposcope for private repositories. -
Verify Path Exists
Check that the path exists in the repository:
- Visit the URL in your browser
- Verify the branch name is correct
- Check the file/directory path spelling
-
Check Branch Name
Ensure you’re using the correct branch:
- Verify Repository Access Confirm you have access to the repository in your browser while logged in
Could Not Get Download Link
Could Not Get Download Link
Error Message:Cause:
The API response didn’t include a download URL for the file. This error is raised in src/requests.rs:203.Solutions:
- Verify Item is a File This error typically occurs when the item is not a file. Ensure you’re not trying to download a submodule or symbolic link.
-
Check Repository Structure
Some GitHub repository items don’t have download URLs:
- Git submodules
- Symbolic links
- Some special GitHub objects
-
Try Parent Directory
Instead of the specific file, try cloning the parent directory:
-
Authenticate
Some edge cases may require authentication:
Zip Creation Failed
Zip Creation Failed
Error Message:Cause:
When using the
--zipped flag, the zip creation process failed (src/main.rs:109-113).Solutions:-
Check Disk Space
Ensure you have enough disk space:
-
Verify Write Permissions
Ensure you have write permissions in the current directory:
-
Check Directory Exists
The directory to zip must exist and contain files:
-
Try Without —zipped
Clone without the
--zippedflag first, then zip manually:
Quiet Mode Not Working
Quiet Mode Not Working
Issue:
Output is still showing even with
--quiet flag.Cause:
The --quiet flag only suppresses info-level logs, not warnings and errors (src/main.rs:25-29).Solutions:-
Understand Quiet Mode Behavior
Quiet mode shows:
- Warnings (important notices)
- Errors (failures)
- Info messages (progress updates)
-
Suppress All Output
To suppress everything except errors:
-
Redirect Output
For complete silence in scripts:
Debug Mode
For additional troubleshooting, enable debug logging:- API request URLs
- Response parsing details
- File operations
- Detailed error information
Getting Help
If you’re still experiencing issues:- Check Existing Issues Search the GitHub issues for similar problems
-
Gather Information
When reporting issues, include:
- The exact command you ran
- The complete error message
- Debug output (
RUST_LOG=debug) - Operating system and version
- cloneit version (
cloneit --version)
- Create a Minimal Example Try to reproduce the issue with a public repository if possible
- Report the Issue Open a new issue on the cloneit GitHub repository with all gathered information