3

I would like to start to use bitbucket, I've made the tutorial's steps to connect to their server. link

Bit something always wrong with the config file. I use ubuntu 12.10.

root@peter-VPCEH1M1E:/home/peter/Dropbox/C++/Qt/sql/.git# git push [email protected]:erbal/sql.git
/root/.ssh/config: line 1: Bad configuration option: [core]
/root/.ssh/config: line 2: Bad configuration option: repositoryformatversion
/root/.ssh/config: line 3: Bad configuration option: filemode
/root/.ssh/config: line 4: Bad configuration option: bare
/root/.ssh/config: line 5: Bad configuration option: logallrefupdates
/root/.ssh/config: line 6: Bad configuration option: ignorecase
/root/.ssh/config: line 7: Bad configuration option: [remote
/root/.ssh/config: line 8: Bad configuration option: fetch
/root/.ssh/config: line 9: Bad configuration option: url
/root/.ssh/config: line 10: Bad configuration option: [branch
/root/.ssh/config: line 11: Bad configuration option: remote
/root/.ssh/config: line 12: Bad configuration option: merge
/root/.ssh/config: terminating, 12 bad configuration optionsfatal: The remote end hung up unexpectedly

My config file looks like the example from the tutorial, with my ssh url.

1
  • I have edited my answer to clarify which content should be in an ~/.ssh/config file. Commented Jul 30, 2013 at 11:50

2 Answers 2

8

The configuration content file in question is not the ~/.ssh/config one.

It is the git config (which somehow got copied over the ~/.ssh/config) :

  • either the local one:
    git config --local -l (in your repo .git/config)
  • or the global one:
    git config --global -l (in your homedir: ~/.gitconfig)

(I will assume here that the system git config file is correct).

You need to:

An ~/.ssh/config file should look like:

Host workdid
 HostName bitbucket.org
 IdentityFile ~/.ssh/workdid
Host personalid
 HostName bitbucket.org
 IdentityFile ~/.ssh/personalid
Sign up to request clarification or add additional context in comments.

2 Comments

is it the tabbing really having an effect or just new line is enough?
@gumuruh I don't think the tabulation would matter here.
4

It looks like your ssh-config file /root/.ssh/config contains configuration for git which should be in /home/peter/Dropbox/C++/Qt/sql/.git/config

ssh and git is two different programs. They interact with eachother but are configured seperately.

It also looks like you're using dropbox to store your git-repo. This can cause problems, to cite the help at #git@freenode: `

12:19 <iveqy> !dropbox
12:19 -gitinfo([email protected])- Storing git repositories on DropBox is a Very Bad Idea™. Use a free hosting service (such as Bitbucket or GitHub), or read !dropbox_why if you insist upon having your repo corrupted.
12:19 <iveqy> !dropbox_why
12:19 -gitinfo([email protected])- git uses a lot of frequently-changed small files, which dropbox's synchronization algorithms barf on. Use of multiple dropbox clients compounds this, with hilarious results ` I suggest you read the link you posted again and try to follow the steps more carefully.

3 Comments

Please use backticks (`) to quote verbatim text (like names of programs and pathnames), and use the > character to quote (cite) things. Inside citations, replace < characters with &lt; entities and > characters with &gt; entities.
The quoted config file is in the /home/peter/Dropbox/C++/Qt/sql/.git/ directory. Isn't it the right one?
Look at the first error line: /root/.ssh/config: line 1: Bad configuration option: [core]. That's not the about /home/peter/Dropbox/C++/Qt/sql/.git/config it's about /root/.ssh/config. The fact that you're standing in the not important.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.