Pound Hash
Pound Hash

Reputation: 553

VSCode is stuck pushing content to my GitHub repo

When I try to push changes to my online repo, the sync icon on the left of the status bar doesn't stop rotating.

OS: Windows 10

VSCode ver: 1.58

Upvotes: 12

Views: 52176

Answers (8)

ewang
ewang

Reputation: 35

@Priti roy's solution worked for me. The only difference is, I'm using Bitbucket. In the last step (step 3), replace <user_name> with <project_name>, i.e., git remote set-url origin [email protected]:<project_name>/repo.git

Upvotes: 0

Bryon Nicoson
Bryon Nicoson

Reputation: 943

For me, this happens when I forget to enter a Commit Message. VSCode then opens the COMMIT_EDITMSG file for editing. Entering a message, saving the file, and clicking the checkmark (highlighted in green) resolves this for me.

enter image description here

Upvotes: 1

user23883829
user23883829

Reputation:

I had the same issue when I was doing COMMIT, and it was an endless process. The solution is always to put a message on the top of the commit before committing.

Upvotes: 0

Nick
Nick

Reputation: 313

I had a similar issue, After closing the COMMIT_EDITMSG window it was committed.

Upvotes: 16

Priti roy
Priti roy

Reputation: 11

Use SSH key pair

  1. Generate an SSH key pair using ssh-keygen command with your email address as a label.
ssh-keygen -t rsa -b 4096 -C "[email protected]"
  1. Add your public key to your Git account.

    • Copy your public key to your clipboard using the following command(if you're in linux):
xclip -sel clip < ~/.ssh/id_rsa.pub
-   Go to your Git account settings and click on “SSH and GPG keys”.
-   Click on “New SSH key” or “Add SSH key”.
-   Paste your public key into the “Key” field and click on “Add SSH key”.
  1. Update your remote URL to use SSH instead of HTTPS.
git remote set-url origin [email protected]:username/repo.git
  1. Test your connection by running ssh -T [email protected].
  2. Push your changes using git push.

hope this helps

Upvotes: 1

George Firsanov
George Firsanov

Reputation: 21

I had the same problem. I've decided to commit from terminal. The command git add --all added my new files. After this, icon 'Commit' started work correctly. (But you can also type git commit by yourself). I hope, It'll help somebody

Upvotes: 1

Sergio M
Sergio M

Reputation: 31

Visual Studio doesn't output Git remote error so, first of all, I would check if credentials/remote is correctly set.

Many VCS providers are switching from user/password to SSH keys and allowing read/write operations only with SSH keys the that repository gets switched. If this is the case, you would not even be able to switch branch or pull.

If this is your case, in Visual Studio go to Git/Manage Remotes and update the clone link.

Upvotes: 2

Pound Hash
Pound Hash

Reputation: 553

Working now

The solution was to manually run git push from the terminal. Thereafter, git integration in VSCode works.

Upvotes: 29

Related Questions