Where does Xcode server store the bots? How can bots be transferred to another machine? - xcode-server

I have created multiple bots using Xcode and Xcode server. I'd like to backup these bots and transfer it to another machine. How can this be done?

All of the Xcode Server bot information is stored in a CouchDB. The path (Current as of Server.app 5.2, and Xcode.app 8.2.1) is:
/Library/Developer/XcodeServer/Database/*
/Library/Developer/XcodeServer/Database/xcs.couch
You can probably copy & paste the entire 'XcodeServer' folder from one server to another and startup the Xcode Server Service.
A couple other helpful hints when dealing with Xcode Server:
The CouchDB instance for Xcode Server can be accessed at: http://localhost:10355/_utils/
Check out this great series of articles on the nuts and bolts of Xcode Server: https://honzadvorsky.com/articles/2015-05-04-under-the-hood-of-xcode-server/

Maybe this little guide can help.
From the machine in which there are the bots you want migrate, open the browser and go to:
https://localhost:20343/api/bots
Save the JSON you just received in a text file and import it to the destination machine.
From the destination machine, open a terminal and:
cd /Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer/usr/share/xcs/xcsd/routes
sudo nano routes_bot.js
Edit the file adding the following lines before the line "module.exports = router":
router.route('/bots/noauth').post(prepareRequest, bot.create);
Save the file you just edited;
Restart XcodeServer:
sudo xcscontrol --shutdown
sudo xcscontrol --start
Wait until the restart process is finished;
Open POSTMAN (or any http client you want), open Settings and disable "SSL certificate verification";
Prepare a request with the following parameters:
POST
URL: https://localhost:20343/api/bots/noauth
Headers:
Content-Type: application/json
Body: "raw"
One at time, paste into the BODY the items of the "results" array contained into the JSON you saved at the point 2, and send the request.
Now you have all your bots. Enjoy!

Related

I can't connect to Mac with Xamarin Mac Agent from Visual Studio 2015

I'm continuing my adventure with Xamarin.
I'm developing an Xamarin Forms application with a Portable Class Libraries (PCL).
I have compiled and debugged my application by Android, but now, I'm interested to run the application in iOS to test in this platform.
I have a problem with the connection between my PC and the Mac.
I have a PC (Windows 8.1) with Visual Studio Community 2015 with Xamarin tools installed.
In my Mac Mini, I have installed OS X (v10.11.3), XCode (v7.2) and Xamarin Studio. I have logged in with my Xamarin account.
In the two machines I have the same Xamarin version.
I have followed the Xamarin walkthrough.
On Visual Studio I open the Xamarin Mac Agent. It finds my Mac Mini. Then it asks me the Mac credentials (user and password).
The login works at this point.
Then, in the solution, I set the iOS project as the startup project. I clean the solution, I build again and start the compile/debug process (F5).
In this point, the output retrieves a message:
1> Connecting to Mac server Macs-Mac-mini.local...
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(54,5): warning : Could not authenticate the user using the existing ssh keys
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(54,5): error : Unable to connect to Address='Macs-Mac-mini.local' with User='macmini
I have used Putty (SSH Client) to check with my user/password if I'm able to connect to Mac, and I have had success.
Into /Users/macmini2/.ssh/authorized_keys file (Mac machine) each time that I use the Xamarin Mac Agent, Visual Studio adds a new key entry (it adds the same repeated).
I see that perhaps the problem is related with ssh keys.
Why I have this problem? What am I doing wrong?
A thing that I have tested was openning the Xamarin project directly in Mac with Xamarin Studio, build it and run the simulator. It works.
I have seen other similar question, but I think that it doesn't have the same problem.
EDIT:
More specific information about the error when I try to compile/debug:
Could not authenticate the user using the existing ssh keys
Xamarin.Messaging.VisualStudio.MessagingAuthenticationException: Could not authenticate the user using the existing ssh keys ---> Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
en Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
en Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
en Renci.SshNet.Session.Connect()
en Renci.SshNet.BaseClient.Connect()
en Xamarin.Messaging.VisualStudio.MessagingService.<ConnectAsync>d__70.MoveNext()
--- Fin del seguimiento de la pila de la excepción interna ---
EDIT 2:
I have revised the troubleshooting Xamarin page, specifically that it says "Unable to authenticate with SSH keys. Please try to log in with credentials first".
I have run:
chmod og-w "$HOME"
grep sshd /var/log/system.log > "$HOME/Desktop/sshd.log"
cd Desktop
cat sshd.log
And the content of the file is:
Apr 18 09:23:28 Macs-Mac-mini sshd[769]: Authentication refused: bad ownership or modes for directory /Users/macmini2/.ssh
Apr 18 09:25:27 Macs-Mac-mini com.apple.xpc.launchd[1] (com.openssh.sshd.EE9A94ED-????-....-????-77254934B300[769]): Service exited with abnormal code: 1
Apr 18 09:59:39 Macs-Mac-mini sshd[1036]: Accepted keyboard-interactive/pam for macmini2 from 192.168.54.14 port 60413 ssh2
Apr 18 09:59:39 Macs-Mac-mini sshd: macmini2 [priv][1036]: USER_PROCESS: 1040 ttys000
But now I don't know what I have to do to solve it.
You have to try delete everything from
%localappdata%\Xamarin\MonoTouch
It helped me, I had the same (or similar) problem today.
I have found the solution about my problem. I have done the following steps:
In my Windows: I have removed the content from "%localappdata%\Xamarin\MonoTouch."
In Mac terminal: Remove the authorized_keys Mac file ("rm /Users/macmini2/.ssh/authorized_keys" in my case)
In Mac terminal: chmod g-w /Users/macmini2/
In Mac terminal: chmod 700 /Users/macmini2/.ssh/
In Mac terminal: Create a empty file: /Users/macmini2/.ssh/authorized_keys (with vim, for example)
In Mac terminal: chmod 600 /Users/macmini2/.ssh/authorized_keys
On Visual Studio: Login with Xamarin Mac Agent
On Visual Studio: Run the application with [Debug] - [iPhoneSimulator] - [iPhone 5 iOS 8.1]
And finally, the simulator runs on Mac computer.
This link helped me.
Xamarin has a Troubleshooting page with large focus on SSH issues:
Connection Troubleshooting
Specifically these two:
Log File Location
Mac – ~/Library/Logs/Xamarin-[MAJOR.MINOR]
Windows – %LOCALAPPDATA%\Xamarin\Logs
The log files can be located by browsing to Help > Xamarin > Zip Logs in Visual Studio.
"Unable to authenticate with SSH keys. Please try to log in with credentials first"
Known cause:
SSH security restriction – This message most often means that one of the files or directories in the fully qualified path of $HOME/.ssh/authorized_keys on the Mac has write permissions enabled for other or group members. Common fix: Run chmod og-w "$HOME" in a Terminal command prompt on the Mac. For details about which particular file or directory is causing the problem, run grep sshd /var/log/system.log > "$HOME/Desktop/sshd.log" in Terminal, and then open the sshd.log file from your Desktop and look for "Authentication refused: bad ownership or modes".
Furthermore there is this section, which does not directly match the error you are seeing but goes into some detail on SSH configuration and diagnosis:
"Couldn't connect to MacBuildHost.local. Please try again."
Reported causes:
Bug – A few users have seen this error message when attempting to log in to the build host using an Active Directory domain user account.
Bug – Some users have seen this error when attempting to connect to the build host by double-clicking the name of the Mac in the connection dialog. Possible workaround: Manually add the Mac using the IP address.
Bug #35971 – Some users have run across this error when using a wireless network connection between the Mac build host and Windows. Possible workaround: Move both computers to a wired network connection.
Bug #36642 – On Xamarin 4.0, this message will appear anytime the $HOME/.bashrc file on the Mac contains an error. (Starting with Xamarin 4.1, errors in the .bashrc file will no longer affect the connection process.) Workaround: Move the .bashrc file to a backup location (or delete it if you know you don't need it).
Limitation – This error can appear if the Mac build host is connected to a router that has no access to the internet (or if the Mac is using a DNS server that times out when asked for the reverse-DNS lookup of the Windows computer). Visual Studio will take roughly 30 seconds to retrieve the SSH fingerprint and eventually fail to connect.
Possible workaround: Add "UseDNS no" to the sshd_config file. Be sure to read about this SSH setting before changing it. See for example http://unix.stackexchange.com/questions/56941/what-is-the-point-of-sshd-usedns-option.
The following steps describe one way to change the setting. You will need to be logged in to an administrator account on the Mac to complete the steps.
Confirm the location of the sshd_config file by running ls /etc/ssh/sshd_config and ls /etc/sshd_config in a Terminal command prompt. For all of the remaining steps, be sure to use the location that does not return "No such file or directory".
Run cp /etc/ssh/sshd_config "$HOME/Desktop/" in Terminal to copy the file to your desktop.
Open the file from your Desktop in a text editor. For example you can run open -a TextEdit "$HOME/Desktop/sshd_config" in Terminal.
Add the following line at the bottom of the file:
UseDNS no
Remove any lines that say UseDNS yes to make sure the new setting takes effect.
Save the file.
Run sudo cp "$HOME/Desktop/sshd_config" /etc/ssh/sshd_config in Terminal to copy the edited file back into place. Enter your password if prompted.
Disable and re-enable Remote Login under System Preferences > Sharing > Remote Login to restart the SSH server.
I have just solved this problem!
It was nonsense.
To connect Visual Studio Xamarin project and simulate that on Mac when you get:
Couldn't connect to computername.local please try again later.
What you need to do next:
Follow the solution from xamarin community about mac connection
after this point if everything OK, you will connect, but if no..
Install XAMARIN STUDIO on MAC. After installation start XAMARIN studio, create your own app and run with simulator
Close app and try to connect again from Windows computer.
At this point you will make synchronization and that's all.
Problem solved! I hope this will be useful for somebody.
For me helped next solution:
1)On Windows open Visual Studio:
Tools=>Options=>Xamarin=>Other and click in Check Now
2)On Mac open Xamarin Studio Community (https://www.xamarin.com/download)
Xamarin Studio Community=>Check for Updates... (and download last one)
After updates all works fine.
I tried a few of the solutions mentioned here and had no success.
However (though not ideal) if I run Visual Studio in Administrator Mode I can successfully connect. Could be a work around for some until a better solution is found.
This is not perfect solution, but made success in my case
Your mac account should not contain any special characters- This is limitation in connection to mac from windows
company-mac1 --- wrong
comapanymac1 --- Correct
For what it's worth I just solved this issue by checking the logs as noted above and in the Xamarin Troubleshooting docs. It turned out to be mismatched iOS versions. Once I updated the Mac version it worked.
In my case, i installed mono sdk on my mac it solve the problem
http://www.mono-project.com/download/#download-mac
Ignored the agent that Visual Studio wizard showed. Something about the Mac computer name VS didn't understand.
I did 'Add Mac', used the IP address, then it connected. That was annoying.
Did you turn on remote login and that is the user/login that is currently logged into the machine? Also, have you tried connecting directly to the IP address instead of the DNS name?
I am on a client's network (different domain than mine) and my VS would never connect via the computer name. I always had to type in the IP address. Also, watch the out put for "Xamarin" in the Output panel/window and see if it gives any more helpful information.
I had this problem recently (despite having enabled Sharing on the OSX host and checking firewall) and it turned out that both OSX Machine and Windows Machine needed the exact same version of Xamarin.iOS and a restart.
Updating both, restarting both, solved the problem for me.
I think what fixed it for me was opening git bash then running ssh onto the mac box. After saying Y to trusting credentials it worked.
In my case I could not connect to XCode because "XCode" file wasn't located at the "Application" folder on MacOS. When the "XCode" app was moved to "Application" folder, I had connect.
Update Visual Studion on Mac and:
1) Delete on Mac - all files in .ssh (rm *)
2) Delete on Mac the folder .ssh
3) On Windows, generate your ssh key and transfer to MAC - for that Open Windows PowerShell and execute the follow commands:
[generate the key]
PS>ssh-keygen -t rsa -b 4096
[define the remote host variable]
PS>$REMOTEHOST="name_of_mac_user#ip_mac_machine"
[send the key to mac machine]
PS>scp "$env:USERPROFILE\.ssh\id_rsa.pub" "${REMOTEHOST}:~/tmp.pub"
[copy the key tmb.pub to authorized_keys file and set the permissions]
PS>ssh "$REMOTEHOST" "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat ~/tmp.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm -f ~/tmp.pub"
4) check on mac .ssh folder if the authorized_keys file is correct:
tail ./authorized_keys
5) check the permission for authorized_keys (-rw-------)
ls -al ./authorized_keys

Installing MarkLogic 8 on CentOS 6.7 x64 via DigitalOcean

Installing MarkLogic 8 on CentOS 6.7 x64 via DigitalOcean
Okay so I downloaded the rpm file from:
https://developer.marklogic.com/download/binaries/8.0/MarkLogic-8.0-3.2.x86_64.rpm
I installed it with:
sudo yum install MarkLogic-8.0-3.2.x86_64.rpm
Started it:
sudo /etc/init.d/MarkLogic start
Went to admin interface:
my_ip_address:8001
I skip joining a cluster
I type in admin for user
Type in a password and confirm it
Realm is public
I click OK and...
I get redirected to:
my_ip_address:8001/security-install-go.xqy
And get this:
No data received
ERR_EMPTY_RESPONSE
Hide details
Unable to load the webpage because the server sent no data.
Reload this webpage
Press the reload button to resubmit the data needed to load the page.
Okay I got it to work.
The only difference I can see this time around was I followed this script (save the nginx stuff):
https://github.com/jmakeig/marklogic-bootstrapping/blob/master/digitalocean/bootstrap.sh
Actually, someone else ran into this and after investigating everything else I tried, this was the answer:
http://developer.marklogic.com/pipermail/general/2015-January/016311.html
The MarkLogic data directory /var/opt/MarkLogic wasn't owned by the daemon user

XAMPP - Apache could not start - Attempting to start Apache service

While trying to start Apache using XAMPP, I was receiving - "Attempting to start Apache service..." message in XAMPP UI. No further details were available.
Where can I see the logs (I was running XAMPP as Admin) ?
IF PORT 80 IS NOT THE ISSUE!
Check to see if the port 80 is in use first as this can be an issue.
You can do this by typing "netstat -an" into cmd. The look for 0.0.0.0:80 under Local Address, if you find this is in use then follow the solution from #Karthik. However, I had a similar issue but my port 80 was not in use.
My XAMPP had wrong paths locations, steps to fix this:
1.Find out the Apache version you are using, you can find this by looking in Services (Control panel, Admin Tools, Services) and finding Apache in my case it was listed as Apache2.4
2.Close XAMPP.
3.Run cmd as admin.
4.execute 'sc delete "Apache2.4"' (put your version in place of mine and without the surrounding ' ', but with the " " around Apache).
5.execute 'sc delete "mySQL"', again remove the '' when you type it.
6.reopen XAMPP and try starting Apache
If you are having trouble with FileZill, Mercury, or Tomcat you could try it here too, but I have not tested that myself.
Hope this helps!
I realized it was a port issue since I was running IIS and other web servers in my machine. But I was more interested to see a detailed error message with the port number in the UI.
Seems like it was not logged in the UI or log file (at least in my case), but in the Event viewer (Control panel -> View Event Logs). Under the Even viewer -> Windows Logs -> Application
I could see a permission error something like the below one:
An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:443
To fix this permission issue for SSL port, Please change the below line in httpd-ssl.conf (C:\xampp\apache\conf\extra)
# When we also provide SSL we have to listen to the
standard HTTP port (see above) and to the HTTPS port
Listen xxx
Replace XXX with any valid port number that is open in your machine
If you are having issues with Port 80, then change the httpd.conf file (C:\xampp\apache\conf)
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 127.0.0.1:8000
I have also summarized other solutions that I came across:
Most often Skype blocks the Apache port. So terminate it and try again.
Find the process id (PID) that is using the Blocked port ( netstat -ano) and kill the corresponding process in Windows Task Manager.
For those who have accidentally (or not) changed one of the .conf files and apache does not run even after trying all the above solutions.
One easy way to track where the issue is located, is to run Apache via command prompt:
(On windows) : open command prompt as admin then navigate inside the bin folder of Apache , next run
httpd in order to run apache
C:\xampp\apache\bin\httpd
For my case it was :
someone had added a virtual host in the specific file that caused the problem . I commented the lines and Apache ran fine.
start xampp (as administrator),
(1) right click C:\xampp\xampp-control.exe, and run as administrator.
(2) unistall service module and then install service module.
(3) now try start the apache and mysql.
Check your DocumentRoot path (in httpd.conf); a typo there can cause this problem.
Had the same issue while updating to PHP7.2
Problem:
First I closed skype and then checked whether port 80 is not an issue. How you can check that? See #AlexT comment above.
In my case, port 80 wasn't an issue. So now I had to figure out what was wrong. So I checked Error Logs Control Panel > Even viewer > Windows Logs > Application and found following error against Apache2.4
httpd.exe: Syntax error on line 520 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 18 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load C:/xampp/php/php7ts.dll into server: The Apache service named is not a valid Win32 application.
Which means I had installed wrong PHP version. Actually I downloaded win64 version while the required version was Win32 for me.
So I downloaded correct version from: Download PHP 7.2.0 extracted it in C:/xampp/php folder, restarted the apache and it worked :)
I had the same issue, executing "setup_xampp.bat" in xampp folder solved my issue.
I had the same problem but it was because I had a previous version of xampp already installed and I tried to install a newer version. I had installed the newer version in another file directory (I had named the file directory xampp2). I solved the problem by uninstalling the newer version, renaming the old one (I renamed it xamppold) and I installed xampp again.
I guess if you haven't installed xampp in another file directory , it should be enough to reinstall xampp. If you are worried about your files , you always can make a backup before reinstalling xampp.
I solved the problem after watching the xampp activity log (the list of the bottom) and realizing xampp was trying to open the custom file path but I had another route path. If the first option didn't work, at least you can scroll up in the activity log and see what's error you get while starting as admin and trying to re install the Apache module or trying to start the module.
You may wander why I didn't just simply uninstall the whole thing from the beginning , and the answer would be because I had to tweak a couple of things in xampp for some different projects (from changing the ports , to add .dll to run mongo.db in Apache), and I was just too lazy to re-do everything again :b
I hope my answer can be helpful for anyone since this is my first time writing in stackoverflow :)
Cheers
In my case, with the same problem and Xampp window, I had copied \apache\conf\extra\httpd-vhosts.conf entries from an old Xampp version to a newly installed one so I could continue to open local projects in browsers. One of the vhosts paths was wrong. After deleting that entry Apache started without problem.
The reference by #Karthik to "in the Event viewer (Control panel -> View Event Logs" saved me time. It's all too easy to presume Xampp logs will point to the problem. It doesn't.
Also check if your xampp is installed in the main directory like C or D or E and not in or within a folder of that directory? i.e. ( "D:/Xampp" or is it "D:/something/Xampp") if its not in the main path of the directory, it will show this error.
copy your xampp directory from "D:\Something\Xampp" to "D:"
So it becomes like this "D:\Xampp"
and the issue will be resolved.
Starting Xampp as a console application (simply by doubleclicking xampp_start.exe in the Xampp root folder) was the only thing that worked for me on Windows 10 (no Skype, no Word Wide Web Publishing Service). WampServer and UwAmp also didn't work.
I had a hard-coded IP in httpd.conf and my local IP had changed which was causing my issue, changed IP over and all worked again
My scenario was different after I tested all the possible options. If you have changed the ports and still get the same problem, well here's something you can try out. This was done in Windows 7.
Step 1: Confirm the cause of the error by going to Control Panel -> System and Security -> Administrative Tools -> Event Viewer -> Windows Logs -> Application -> Error. Mine said "The Apache service named reported the following error:
httpd.exe: Syntax error on line 424 of C:/xampp/apache/conf/httpd.conf: Cannot load c:\xampp\php\php5apache.dll into server: The specified module could not be found." So I needed to change \php5apache.dll to the version of my php and apache version installed which was php7apache2_4.dll
Step 2: To get the correct name for your .dll php and apache file, got to C:\xampp\php. You will see something like php7apache2_4.dll with other files in the folder.
Step 3: Go to C:/xampp/apache/conf/httpd.conf and edit the configuration file and change "c:\xampp\php\php5apache.dll" to "c:\xampp\php\php7apache2_4.dll" in my case. Make sure you open the file as administrator save changes made.
Step 4: Run the xampp server and everything should work fine. Do not forget to shut down the xampp server before doing the changes to the apache configuration file.
Hope this helps. Cheers! :)
Try to install x86 version of XAMPP. The default XAMPP version on their website is x64 (maybe because I'm using x64 Windows 7).
download link here
I had this issue when I installed under Program Files, which they do not recommend due to write issues. This might only be a problem if you are not logged in as an admin and use a password to install. I just uninstalled and installed in a directory that did not need admin privileges.
Make sure Apache didn't get Disabled in Services (Control panel, Admin Tools, Services). If it's Disabled then Set it to Manual and it should run. That was my case, I found Apache Disabled.
Solution for my particular scenario (It had been working a couple days before getting borked):
Port 80 was not the problem, but something I had done while messing around with Services and Startup.
Type msconfig on Windows' Start menu
Click System Configuration
Screenshot for System Configuration
In the Services tab, search for Apache24 (Click "Hide all Microsoft services" in the checkbox at the bottom of the window to make it easier to find)
If its checkbox isn't checked, check it
If it was already checked, then this guide isn't going to help. However if it is:
Click OK, your PC will have to restart
Try once again! In my case Apache was already running once I opened Xampp
I had the same issue.Just click on services button.Then find apache and right cick > properties > set startup type as Automatic/ Manual. Now close apache and try again.It will work!
For me it wasn't a port or service issue; I had to re-run the XAMPP setup script. Although this didn't directly fix the issue for me, the script was much more verbose than the XAMPP log, pointing me in the right direction to actually solve the problem.
From the XAMPP GUI, click on Shell, type set, press Tab to autocomplete to the setup_xampp.bat file, and then press Enter to run it.
In my case I got the following output:
[ERROR]: Test php.exe failed !!!
[ERROR]: Perhaps the Microsoft C++ 2008 runtime package is not installed.
[ERROR]: Please try to install the MS VC++ 2008 Redistributable Package from the Mircrosoft page first
[ERROR]: http://www.microsoft.com/en-us/download/details.aspx?id=5582
This particular error is misleading. Although it specifies the Visual C++ 2008 Redistributable Package, PHP 7.4.x requires the Visual C++ 2019 Redistributable Package.
After installing that and following the prompt to restart, sure enough I'm now able to start Apache as normal.
make sure no space in front of the port number if you ever edited it.
From Xampp control panel, click on config (next to Apache), then choose Apache(httpd.config), search for listen 80 and change the port to another port.
If nothing works with you, I would suggest you download MAMP and use it instead.
It does the same thing, if not better.
Comment this lines from httpd.conf:
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf
In the case you're using them it may solve.
when i run xampp control panel normal:
I had been run
I can’t start apache
So, I will run it with administrator:
I can run apache

Why would git-upload-pack (during git clone) hang?

I've read several other 'git hangs on clone' questions, but none match my environment and details. I'm using git built under cygwin (msys git is not an option) to clone a repo from a Linux host over SSH.
git clone user#host:repo
I've tested against the same host on other platforms, and it works fine, but on this Windows machine the clone hangs indefinitely. I set GIT_TRACE=1 and it looks like the problem is with this command:
'ssh' 'user#host' 'git-upload-pack '\''repo'\'''
My SSH keys are set up correctly: ssh user#host works fine. When I run the command, I get a bunch of output that ends like this:
...
003dbbd3db63763922ad75bbeefa3811dce001576851 refs/tags/start
0000
Then it hangs for 20+ minutes, which is the longest I've waited before killing it.
The server has Git 1.7.11.7 with OpenSSH 5.9p1, while the client has Git 1.7.9 with OpenSSH 6.1p1.
Is that supposed to be the end of the git-upload-pack output? Is this a bug in Git or my configuration?
The upcoming git1.8.5 (Q4 2013) will document more the smart http protocol.
See commit 4c6fffe2ae3642fa4576c704e2eb443de1d0f8a1 by Shawn O. Pearce.
With that detailed documentation, the idea would be to monitor the web requests done between your git client and the server, and see if those conforms to what is documented below.
That could help in pinpointing where the service "hangs".
The file Documentation/technical/http-protocol.txt insists on:
the "Smart Service git-upload-pack"
Clients MUST first perform ref discovery with '$GIT_URL/info/refs?service=git-upload-pack'.
C: POST $GIT_URL/git-upload-pack HTTP/1.0
S: 200 OK
S: Content-Type: application/x-git-upload-pack-result
S: Cache-Control: no-cache
S:
S: ....ACK %s, continue
S: ....NAK
Clients MUST NOT reuse or revalidate a cached reponse.
Servers MUST include sufficient Cache-Control headers
to prevent caching of the response.
Servers SHOULD support all capabilities defined here.
Clients MUST send at least one 'want' command in the request body.
Clients MUST NOT reference an id in a 'want' command which did not appear in the response obtained through ref discovery unless the server advertises capability "allow-tip-sha1-in-want".
The "negociation" algorithm
(c) Send one $GIT_URL/git-upload-pack request:
C: 0032want <WANT #1>...............................
This worked for me, incase it helps someone else.
Check your git remote url. It might hang with git-upload-pack on a trace if your using the wrong url type. You change the url from ssh git#github.com: to https://github.com/ on your remote.
We have faced a similar issue - and we attributed it to the following: Our git repo has a LOT of binary files checked in (multiple versions, over the past 1.5 years of this project). So, we assumed that this was the cause.
To support this theory, we have other code bases that are more recent (and thus do not have so many binary files and their versions) - which do not exhibit this behavior.
Our setup: Git setup on linux, site-to-site VPN between London and India over a T1 line.
I was having this same problem after I added some jazz like this to my ssh config in order to set window titles in tmux:
Host *
PermitLocalCommand yes
LocalCommand if [[ $TERM == screen* ]]; then printf "\033k%h\033\\"; fi
getting rid of that fixed my git.
An outdated PuTTy can also cause this. Your system might be using plink.exe as GIT_SSH.
You can install the latest development build from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html to make sure this is not the problem.
My problem was simple. I updated the VPN client and git started hanging. I quit the VPN client and restarted it.

rabbitmqctl.bat on Windows XP: unable to connect to node rabbit#MYPCNAME: nodedown

I have just installed RabbitMQ on my WindowsXP PC. I have fulfilled the Erlang OPC15 prereq as well.
My rabitmq seems to be working. I did a simple test using pika in python and it seems to work. The service is urnning.
The problem is that I cannot do anything with rabbitmqctl.bat. I always get the response:
Status of node rabbit#MYPCNAME ...
Error: unable to connect to node rabbit#MYPCNAME: nodedown
diagnostics:
- nodes and their ports on MYPCNAME: [{rabbit,3097},{rabbitmqctl17251,1132}]
- current node: rabbitmqctl17251#mypcname
- current node home dir: C:\Documents and Settings\Myuser
- current node cookie hash: NOTSUREIFTHISISSENSITIVESOREMOVED==
In my rabbitmq log file I get:
=ERROR REPORT==== 12-Feb-2012::17:01:22 ===
** Connection attempt from disallowed node rabbitmqctl17251#mypcname **
From various forums I deduce this has something to do with cookies. What cookies are we talking about? What do I need to do to be able to manage my RabbitMQ instance using rabbitmqctl.bat? Please word your answer in a way that a non-erlang non-functional programmer would understand.
Had the same problem, this instruction straight out of the manual installation guide solved my problem:
Synchronise Erlang Cookies (when running a manually installed Windows Service)
Erlang Security Cookies used by the service account and the user
running rabbitmqctl.bat must be synchronised for rabbitmqctl.bat to
function.
To ensure Erlang cookie files contain the same string, copy the .erlang.cookie file from the Windows directory (normally C:\WINDOWS\.erlang.cookie) to replace the user .erlang.cookie. The user cookie will be in the user's home directory (%HOMEDRIVE%%HOMEPATH%), e.g. C:\Documents and Settings\%USERNAME%\.erlang.cookie or C:\Users\%USERNAME%\.erlang.cookie (Windows Vista and later).
Shortcut command for #Lining answer:
copy C:\Windows\.erlang.cookie %HOMEDRIVE%%HOMEPATH%\.erlang.cookie
Try to create a file called .erlang.cookie in your $HOME directory and put a simple passphrase in there.
Then restart rabbitmq and it might work. If it doesn't then rabbitmq is doing something to make sure you cannot put a system wide cookie in place.
It worked for me after replacing ".erlang.cookie" file under c:\Windows in C:\Documents and Settings\username folder, because cookie should be same as per my understanding.

Resources