scibor
scibor

Reputation: 1011

Git expects numerical timeout?

Working on a project in IntelliJ and pushing/pulling all material to github.

Suddenly it stops working: I tried to fetch the code from github and get the error message: Fetch failed Error: option 'timeout' expects a numerical value

Similar error messages have occurred whenever I tried to push, but ultimately the push always went through. Until now, when I suddenly get the message

Push rejected Master: rejected

I'm really inexperienced with git, any answers are helpful!

cd coding
git pull

Please specify which branch you want to merge with.
See git-pull(1) for details

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream master origin/<branch>

When I try to pull and

git push
error: option `timeout' expects a numerical value
usage: git credential-cache [options] <action>

--timeout <n>         number of seconds to cache credentials
--socket <path>       path of cache-daemon socket

Everything up-to-date

The problem is everything ISN'T up to date

Hey guys, appreciate all the help, turned out that the error was something very simple that was overlooked during the setup of git on my machine.

https://help.github.com/articles/set-up-git

If anyone else has problems like the ones mentioned above, there's one thing you can try. Afterwards a pull-merge and then push worked fine.

Upvotes: 2

Views: 4296

Answers (2)

user13897209
user13897209

Reputation: 11

I think you should set a timeout like:

git config credential.helper 'cache --timeout == 3600'

Upvotes: 1

VonC
VonC

Reputation: 1327184

If something related to GitHub suddenly stop working, then it is probably linked to its status.

6:24 UTC A small percentage of repositories are currently unavailable while we perform maintenance.

If it does persist though, then it could be related with some local configuration issue.

For instance, check git status and git branch, making sure you are on a branch, and not in a detached HEAD mode.

If git status mentions files to be committed (ie they have been added to the index but not yet registered ion a commit), do a git commit after your git add.

If git branch doesn't return anything, then you need to follow "Git: How can I reconcile detached HEAD with master/origin?"

Upvotes: 2

Related Questions