diff --git a/git_commit b/git_commit index c6d7a15..4e628fc 100644 --- a/git_commit +++ b/git_commit @@ -1,7 +1,6 @@ #!/bin/bash # bash <(curl -s https://git.technozone.com.au/vijay/Scripts/branch/main/git_commit) && rm -f git_commit - # Prompt for the Gitea repository URL read -p "Enter your Gitea repository URL: " GITEA_URL @@ -45,10 +44,10 @@ git commit -m "$commit_message" # Push changes if [ -z "$GIT_TOKEN" ]; then echo "Pushing changes using username and password..." - git push "$GITEA_URL" --username "$username" --password "$password" + git push "https://$username:$password@$GITEA_URL" else echo "Pushing changes using token..." git push "$GITEA_URL" fi -echo "Changes pushed successfully." \ No newline at end of file +echo "Changes pushed successfully."