Refreshing Remote Repositories Failed Sourcetree

Hello,

  1. Refreshing Remote Repositories Failed Sourcetree System
  2. Refreshing Remote Repositories Failed Sourcetree Download

I am having an error when I try to push my changes to a remote repository.

This is a sumarry of what I did:

Apr 16, 2017 Refreshing Remote Repositories Failed. 2.4.1 (Detail in the image). 'pull' from or to Bitbucket and also Github becase of. Refreshing Remote Repositories Failed. XML Word Printable. 2.4.1 (Detail in the image) Symptom Severity. I can't view 'Remote Repository' tab, and 'push', 'fetch', 'pull' from or to Bitbucket and also Github becase of 'Refershing Remote Repositories Failed'. If I click 'Sign in. SourceTree refresh all repositories status. D3bgger Feb 26, 2014.

1- On the remote server, create the repository using 'git init /root/my_project'

2 - On the remote server, I added the files with 'git add file.txt'

3 - On the remote server, I've commited my changes with 'git commit -a -m 'description of commit'

4 - On my machine, I've used git clone ssh://root@192.168.1.2:22/root/my_project/

Refreshing Remote Repositories Failed Sourcetree

5 - Then on my machine, I make some changes to files and commit them using the same commands as on the remote server.

Refreshing Remote Repositories Failed Sourcetree

6 - Then, after the commit, I try to use the command 'git push' with defaults to my origin and the master branch but I always get the same error message:

root@192.168.1.2r's password:Counting objects: 5, done.Delta compression using up to 2 threads.Compressing objects: 100% (3/3), done.Writing objects: 100% (3/3), 317 bytes | 0 bytes/s, done.Total 3 (delta 2), reused 0 (delta 0)remote: error: refusing to update checked out branch: refs/heads/masterremote: error: By default, updating the current branch in a non-bare repositoryremote: error: is denied, because it will make the index and work tree inconsistentremote: error: with what you pushed, and will require 'git reset --hard' to matchremote: error: the work tree to HEAD.remote: error:remote: error: You can set 'receive.denyCurrentBranch' configuration variable to

remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into

remote: error: its current branch; however, this is not recommended unless youremote: error: arranged to update its work tree to match what you pushed in some

remote: error: other way.remote: error:remote: error: To squelch this message and still keep the default behaviour, set

remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.To ssh://root@192.168.1.2:22/root/my_project/ ! [remote rejected] master -> master (branch is currently checked out)error: failed to push some refs to 'ssh://root@192.168.1.2:22/root/my_project/'

Can you guys help me with this? I don't know where I am wrong.

Refreshing Remote Repositories Failed Sourcetree

Your remote server has to be 'bare' and it doesn't look like yours was...

Hence the error message 'By default, updating the current branch in a non-bare repository remote: error: is denied...'

Your command should've been something like this:

~ $ git init --bare my_project.git

I hope that helps

Best Regards

AJ

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

I use SourceTree to manage all my Git repositories, it's a great tool but sometimes something goes wrong with remote tags refs in one of my work repositories and I get error messages when I do a push that tells me that a bunch of tags have been rejected. Now I never actually create any tags so this is a little confusing. Cloning a fresh version of the repository fixes this but is not a solution all the time, especially if you have a bunch of stashes. Luckily there is an option in SourceTree to disable pushing tags to remotes.
This is the kind of error message I get...Refreshing Remote Repositories Failed Sourcetree
Git
To [email protected]:myuser/myrepo.git
= [up to date] develop -> develop
= [up to date] 7.0.5.1 -> 7.0.5.1
= [up to date] 7.0.6.1 -> 7.0.6.1
= [up to date] 7.0.7.1 -> 7.0.7.1
= [up to date] 7.0.8.1 -> 7.0.8.1
= [up to date] 7.0.9.1 -> 7.0.9.1
! [rejected] 7.0.10.1 -> 7.0.10.1 (already exists)
! [rejected] 7.0.11.1 -> 7.0.11.1 (already exists)
! [rejected] 7.1.1.1 -> 7.1.1.1 (already exists)
updating local tracking ref 'refs/remotes/origin/develop'
error: failed to push some refs to '[email protected]:myuser/myrepo.git'
hint: Updates were rejected because the tag already exists in the remote.

The culprit is shown below. In the

Refreshing Remote Repositories Failed Sourcetree System

'push' dialog there is an option to 'Push all tags'. Unticking that makes the errors go away.

There is a better way to do this via Preferences under the 'Git'

Refreshing Remote Repositories Failed Sourcetree Download

tab simply untick 'Push all tags to remotes' and you're done.

-i