Unable to push changes to remote server

0
I have successfully clone the repository from the remote server
  git clone http://115.29.245.218:96/mkr_pc.git

  But the server refused when I tried to push local changes to the remote server
  error: RPC failed; HTTP 401 curl 22 The requested URL returned error: 401

  I had a look at the error log in C://GitStack/apache/log, it shows
  access to /mkr_pc.git/git-receive-pack failed, reason: require directives present and no Authoritative handle

  This is a list of the directories and files in mkr_pc.git
hooks
info
objects
refs
config
description
HEAD
  What should I do? .
asked December 12, 2016

2 Answers

0
The other weird bug is that after I change the repository location to D:\\wwwroot, and created the new repository mkr_pc.git, but the responsitory list in the administrative panel is NOT showing anything. The repository list is empty even though there is a mkr_pc folder in the wwwroot
0
BTW, I received the following error message when I tried to change the repository folder from C:\GitStack\repositories to D:\wwwroot.

ValueError at /rest/settings/general/repositorylocation/ Invalid \escape: line 1 column 20 (char 20) Request Method: PUT Request URL: http://localhost:96/rest/settings/general/repositorylocation/ Django Version: 1.4.13 Python Executable: C:\GitStack\apache\bin\httpd.exe Python Version: 2.7.2 Python Path: ['C:\\GitStack\\app', 'C:\\GitStack\\python\\lib\\site-packages\\rsa-3.0.1-py2.7.egg', 'C:\\GitStack\\python\\lib\\site-packages\\pyasn1-0.1.3-py2.7.egg', 'C:\\GitStack\\python\\lib', 'C:\\GitStack\\python\\python27.zip', 'C:\\GitStack\\python\\DLLs', 'C:\\GitStack\\python\\lib\\plat-win', 'C:\\GitStack\\python\\lib\\lib-tk', 'C:\\GitStack\\apache\\bin', 'C:\\GitStack\\python', 'C:\\GitStack\\python\\lib\\site-packages'] Server time: Mon, 12 Dec 2016 21:29:04 +0800 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'gitstack', 'rest') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "C:\GitStack\python\lib\site-packages\django\core\handlers\base.py" in get_response 109. response = callback(request, *callback_args, **callback_kwargs) File "C:\GitStack\python\lib\site-packages\django\views\decorators\csrf.py" in wrapped_view 77. return view_func(*args, **kwargs) File "C:\GitStack\app\rest\views.py" in rest_repositorylocation 463. data = json.loads(request.raw_post_data) File "C:\GitStack\python\lib\json\__init__.py" in loads 326. return _default_decoder.decode(s) File "C:\GitStack\python\lib\json\decoder.py" in decode 366. obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\GitStack\python\lib\json\decoder.py" in raw_decode 382. obj, end = self.scan_once(s, idx) Exception Type: ValueError at /rest/settings/general/repositorylocation/ Exception Value: Invalid \escape: line 1 column 20 (char 20) Request information: GET: No GET data POST: No POST data FILES: No FILES data COOKIES: Hm_lvt_13672e969e2923db41ed8904718f8745 = '1481522098,1481522194,1481544240,1481544997' visitor_type = 'old' CNZZDATA5334006 = 'cnzz_eid%3D176209318-1480455309-%26ntime%3D1481540552' bdshare_firstime = '1481522778330' ASP.NET_SessionId = 'ssnoac45vgaciiq30rx5l055' 53revisit = '1480456598940' safedog-flow-item = '' 53gid0 = '10158905883018' 53gid2 = '10158905883018' sessionid = '6bad145988642dba4af4d87ba43eeb58' Hm_lpvt_13672e969e2923db41ed8904718f8745 = '1481544997' csrftoken = 'G1eGAU1mmlLzD25TxCBbvvWTwSSwE3R5' 53kf_70862522_keyword = '' uvts = '5Olrqz8wXueEZoyR' 53gid1 = '10158905883018' __uvt = '' kf_70862522_keyword_ok = '1' META: wsgi.multiprocess = False HTTP_REFERER = 'http://localhost:96/gitstack/settings/general/' SERVER_SOFTWARE = 'Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8u mod_wsgi/3.3 Python/2.7.2 PHP/5.4.3' SCRIPT_NAME = u'' mod_wsgi.handler_script = '' SERVER_SIGNATURE = '' REQUEST_METHOD = 'PUT' PATH_INFO = u'/rest/settings/general/repositorylocation/' HTTP_ORIGIN = 'http://localhost:96' SERVER_PROTOCOL = 'HTTP/1.1' QUERY_STRING = '' CONTENT_LENGTH = '44' HTTP_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36' HTTP_CONNECTION = 'keep-alive' HTTP_COOKIE = '53gid2=10158905883018; 53revisit=1480456598940; safedog-flow-item=; 53gid0=10158905883018; 53gid1=10158905883018; bdshare_firstime=1481522778330; sessionid=6bad145988642dba4af4d87ba43eeb58; __uvt=; ASP.NET_SessionId=ssnoac45vgaciiq30rx5l055; CNZZDATA5334006=cnzz_eid%3D176209318-1480455309-%26ntime%3D1481540552; visitor_type=old; 53kf_70862522_keyword=; kf_70862522_keyword_ok=1; Hm_lvt_13672e969e2923db41ed8904718f8745=1481522098,1481522194,1481544240,1481544997; Hm_lpvt_13672e969e2923db41ed8904718f8745=1481544997; csrftoken=G1eGAU1mmlLzD25TxCBbvvWTwSSwE3R5; uvts=5Olrqz8wXueEZoyR' SERVER_NAME = 'localhost' REMOTE_ADDR = '::1' REMOTE_USER=$REDIRECT_REMOTE_USER = '' mod_wsgi.request_handler = 'wsgi-script' PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC' wsgi.url_scheme = 'http' GIT_HTTP_EXPORT_ALL = '' PATH_TRANSLATED = 'C:\\GitStack\\app\\app\\wsgi.py\\rest\\settings\\general\\repositorylocation\\' SERVER_PORT = '96' mod_wsgi.version = mod_wsgi.input_chunked = '0' GIT_PROJECT_ROOT = 'D:/wwwroot' SERVER_ADDR = '::1' DOCUMENT_ROOT = 'C:/GitStack/apache/htdocs' mod_wsgi.process_group = '' COMSPEC = 'C:\\Windows\\system32\\cmd.exe' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' SCRIPT_FILENAME = 'C:/GitStack/app/app/wsgi.py' SERVER_ADMIN = 'admin@example.com' SCRIPT_URI = 'http://localhost:96/rest/settings/general/repositorylocation/' wsgi.input = HTTP_HOST = 'localhost:96' SCRIPT_URL = '/rest/settings/general/repositorylocation/' mod_wsgi.callable_object = 'application' wsgi.multithread = True SystemRoot = 'C:\\Windows' REQUEST_URI = '/rest/settings/general/repositorylocation/' HTTP_ACCEPT = '*/*' WINDIR = 'C:\\Windows' wsgi.version = GATEWAY_INTERFACE = 'CGI/1.1' wsgi.run_once = False wsgi.errors = REMOTE_PORT = '51387' HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.8' CONTENT_TYPE = 'application/json' mod_wsgi.application_group = '*:96|' mod_wsgi.script_reloading = '1' wsgi.file_wrapper = '' CSRF_COOKIE = 'G1eGAU1mmlLzD25TxCBbvvWTwSSwE3R5' HTTP_ACCEPT_ENCODING = 'gzip, deflate, sdch, br' Settings: Using settings module app.settings USE_L10N = True USE_THOUSAND_SEPARATOR = False CSRF_COOKIE_SECURE = False LANGUAGE_CODE = 'en-us' ROOT_URLCONF = 'app.urls' MANAGERS = DEFAULT_CHARSET = 'utf-8' STATIC_ROOT = 'C:/GitStack/app/app/staticfiles/' ALLOWED_HOSTS = ['*'] MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX = '[Django] ' FILE_UPLOAD_PERMISSIONS = None URL_VALIDATOR_USER_AGENT = 'Django/1.4.13 (https://www.djangoproject.com)' STATICFILES_FINDERS = SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_NAME = 'sessionid' ADMIN_FOR = TIME_INPUT_FORMATS = DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'TEST_MIRROR': None, 'NAME': 'C:/GitStack/data/data.db', 'TEST_CHARSET': None, 'TIME_ZONE': 'America/Chicago', 'TEST_COLLATION': None, 'PORT': '', 'HOST': '', 'USER': '', 'TEST_NAME': None, 'PASSWORD': u'********************', 'OPTIONS': {}}} SERVER_EMAIL = 'root@localhost' FILE_UPLOAD_HANDLERS = DEFAULT_CONTENT_TYPE = 'text/html' APPEND_SLASH = True FIRST_DAY_OF_WEEK = 0 DATABASE_ROUTERS = [] YEAR_MONTH_FORMAT = 'F Y' STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES = {'default': {'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} INSTALL_DIR = 'C:/GitStack' SESSION_COOKIE_PATH = '/' USE_X_FORWARDED_HOST = False MIDDLEWARE_CLASSES = USE_I18N = True THOUSAND_SEPARATOR = ',' SECRET_KEY = u'********************' LANGUAGE_COOKIE_NAME = 'django_language' DEFAULT_INDEX_TABLESPACE = '' TRANSACTIONS_MANAGED = False LOGGING_CONFIG = 'django.utils.log.dictConfig' SEND_BROKEN_LINK_EMAILS = False TEMPLATE_LOADERS = WSGI_APPLICATION = None TEMPLATE_DEBUG = True X_FRAME_OPTIONS = 'SAMEORIGIN' AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend' FORCE_SCRIPT_NAME = None CACHE_BACKEND = 'locmem://' SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SESSION_COOKIE_SECURE = False CSRF_COOKIE_DOMAIN = None FILE_CHARSET = 'utf-8' DEBUG = True SESSION_FILE_PATH = None DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS = LANGUAGES = SETTINGS_PATH = 'C:/GitStack/data/settings.ini' COMMENTS_ALLOW_PROFANITIES = False STATICFILES_DIRS = PREPEND_WWW = False SECURE_PROXY_SSL_HEADER = None GIT_PATH = 'C:/GitStack/git/bin/git.exe' SESSION_COOKIE_HTTPONLY = True DEBUG_PROPAGATE_EXCEPTIONS = False LDAP_USERS_PATH = 'C:/GitStack/data/ldapusers.json' MONTH_DAY_FORMAT = 'F j' LOGIN_URL = '/registration/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE = False TIME_FORMAT = 'P' DATE_INPUT_FORMATS = CSRF_COOKIE_NAME = 'csrftoken' EMAIL_HOST_PASSWORD = u'********************' PASSWORD_RESET_TIMEOUT_DAYS = u'********************' CACHE_MIDDLEWARE_ALIAS = 'default' SESSION_SAVE_EVERY_REQUEST = False ADMIN_MEDIA_PREFIX = '/static/admin/' NUMBER_GROUPING = 0 SESSION_ENGINE = 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH = '/' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGGING = {'loggers': {'console': {'handlers': ['console'], 'level': 'DEBUG'}, 'django.request': {'handlers': ['mail_admins'], 'propagate': True, 'level': 'ERROR'}}, 'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}} IGNORABLE_404_URLS = LOCALE_PATHS = TEMPLATE_STRING_IF_INVALID = '' LOGOUT_URL = '/accounts/logout/' EMAIL_USE_TLS = False FIXTURE_DIRS = EMAIL_HOST = 'localhost' DATE_FORMAT = 'N j, Y' MEDIA_ROOT = '' DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' ADMINS = FORMAT_MODULE_PATH = None DEFAULT_FROM_EMAIL = 'webmaster@localhost' MEDIA_URL = '' DATETIME_FORMAT = 'N j, Y, P' TEMPLATE_DIRS = 'C:/GitStack/templates' SITE_ID = 1 DISALLOWED_USER_AGENTS = ALLOWED_INCLUDE_ROOTS = DECIMAL_SEPARATOR = '.' SHORT_DATE_FORMAT = 'm/d/Y' TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' CACHE_MIDDLEWARE_KEY_PREFIX = u'********************' TIME_ZONE = 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE = '' TEMPLATE_CONTEXT_PROCESSORS = SESSION_COOKIE_AGE = 1209600 SETTINGS_MODULE = 'app.settings' USE_ETAGS = False LANGUAGES_BIDI = FILE_UPLOAD_TEMP_DIR = None INTERNAL_IPS = STATIC_URL = '/static/' EMAIL_PORT = 25 USE_TZ = False SHORT_DATETIME_FORMAT = 'm/d/Y P' PASSWORD_HASHERS = u'********************' ABSOLUTE_URL_OVERRIDES = {} CACHE_MIDDLEWARE_SECONDS = 600 DATETIME_INPUT_FORMATS = GROUP_FILE_PATH = 'C:/GitStack/data/groupfile' EMAIL_HOST_USER = '' PROFANITIES_LIST = u'********************' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

I managed to change the folder successfully after a few attempts to save the folder location to D:\wwwroot, but I don't know why

Your Answer

Please login to post questions.